foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)
[personal profile] foxfirefey
If you're looking to brush up on Javascript, CSS, or HTML skills and you don't already have an account, CodeSchool is having a free weekend May 25-26th.
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 :)
cesy: "Cesy" - An old-fashioned quill and ink (Default)
[personal profile] cesy
I have a link, and when you click on it, it calls edit_tagcloud(tagname);.
I then have a function defined:
function edit_tagcloud(newtag)
{
if (! newtag) return;
var cur_taglist = document.getElementById('prop_taglist').value;
if (cur_taglist.length > 0) {
cur_taglist = cur_taglist + ", " + newtag;
} else {
cur_taglist = newtag;
}
document.getElementById('prop_taglist').value = cur_taglist;
}

What I'm aiming for is that tagname is added to the list already in prop_taglist, which is the id for the tags input box. However, the code above doesn't work - nothing happens when I click on the link. Can anyone tell me what I'm doing wrong, or give me any tips on how to debug Javascript like this?
cesy: "Cesy" - An old-fashioned quill and ink (Default)
[personal profile] cesy
I am trying to implement a solution to Bug 581, and I need to do some Javascript that will make a hidden section appear when clicked on. So far I have this:

$out .= "Click here to see all your tags";
$out .= "


(and then the actual content in the span). What should my ShowTags() function actually do in order to change the style to display:inline? I found one example on the web, but it used fancy browser-sniffing, and it appears we have our own browser-sniffing module and I don't know how to adapt it for that.

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

January 2017

S M T W T F S
1234567
891011121314
151617 18192021
22232425262728
293031    

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 20th, 2017 10:48 am
Powered by Dreamwidth Studios