Jul. 14th, 2010

jportela: (Default)
[personal profile] jportela
I've been trying to add jQuery support to the poll pages, and I want to know the best way to do this.

I tried to use

LJ::need_res('js/jquery/jquery-1.3.2.min.js');

in cgi-bin/LJ/Poll.pm render method, and doing this did include the jquery library (at least by navigating the source code, the <script> tag was there). However, it appears that I can't use it in htdocs/js/livejournal.js (I wanted to use the initPolls function, to change the submit event on polls), there seems to be a conflict and the script crashes the first time a $ (jquery) is used.

One way around this would be not use the jQuery library at all, but that would mean I would have to serialize the form myself (not very hard, but the jquery implementation would probably be the best).

Please share your thoughts on this, I may be including the jquery library in a very unorthodox way :)

Profile

dw_dev_training: The stylised 'd', with the word 'dev' above, and the word 'training' at the side, representing the dw_dev_training comm. (Default)
Dreamwidth Development Training

September 2022

S M T W T F S
    123
45678910
1112131415 1617
18192021222324
252627282930 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 7th, 2025 04:18 pm
Powered by Dreamwidth Studios