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

May 2013

S M T W T F S
   1234
5678 91011
12 13 14151617 18
19202122 232425
262728293031 

Most Popular Tags

Style Credit

Style:
[personal profile] branchandroot
Resources:
On the Down Low

Expand Cut Tags

No cut tags
Page generated May. 24th, 2013 06:42 pm
Powered by Dreamwidth Studios