Search Results

Search found 3 results on 1 pages for 'bloggerious'.

Page 1/1 | 1 

  • Convert JavaScript to jQuery

    - by bloggerious
    I have the following JavaScript code which I like to convert to jQuery but has no luck. I would like to convert it to jQuery specifically beginning from this: <?php if(Voting_Method == 2){ if (mnmxmlhttp[htmlid].readyState == 4) { xvotesString[htmlid] = mnmxmlhttp[htmlid].responseText; if (xvotesString[htmlid].match (errormatch)) { xvotesString[htmlid] = xvotesString[htmlid].substring (6, xvotesString[htmlid].length); <?php if(Voting_Method == 1){ echo "changemnmvalues (htmlid, value, true);"; }?> } else { <?php if(Voting_Method == 2){ echo "var mySplitResult = xvotesString[htmlid].split('~');\n"; echo "target3 = document.getElementById ('xvote-' + htmlid);\n"; echo "target3.style.width = mySplitResult[0] + 'px';\n"; echo "if (target4 = document.getElementById ('mnma-' + htmlid))"; echo " target4.innerHTML = mySplitResult[1];\n"; echo "if (target5 = document.getElementById ('mnmb-' + htmlid))"; echo " target5.innerHTML = mySplitResult[2];\n"; echo "if (target6 = document.getElementById ('mnmc-' + htmlid))"; echo " target6.style.display='none'; \n"; echo "if (target6 = document.getElementById ('mnmd-' + htmlid))"; echo " target6.style.display='block'; \n"; echo "target7 = document.getElementById ('xvotes-' + htmlid);\n"; echo "target7.className = 'star-rating-noh';\n"; }?> <?php if(Voting_Method == 1){ echo 'if (xvotesString[htmlid].substring (1, 6) == "ERROR") { '; echo "alert(xvotesString[htmlid]); } else {"; echo "changemnmvalues (htmlid, value, false); } "; }?> } Any help is greatly appreciated.

    Read the article

  • jQuery: modify href attribute for first level list only

    - by bloggerious
    I'm a noob in jQuery and have stuck at this. I have the following HTML code output from a PHP page: <ul class="cats"> <li><span><a href="cant_post_link_yet1">Lifestyle</a></span></li> <li><span><a href="cant_post_link_yet2">Entertainment</a></span></li> <li class="has_child"> <span><a href="cant_post_link_yet3">Technology</a></span> <ul class="subcats"> <li><span><a href="cant_post_link_yet4">Gadgets</a></span></li> <li><span><a href="cant_post_link_yet5">Hardware</a></span></li> </ul> </li> <li><span><a href="cant_post_link_yetsports">Sports</a></span></li> <li class="has_child"> <span><a href="cant_post_link_yet6">Design</a></span> <ul class="subcats"> <li class="has_child"> <span><a href="cant_post_link_yet7">Web Design</a></span> <ul class="subcat"> <li><span><a href="cant_post_link_yet8">Adobe Photoshop</a></span></li> </ul> </li> <li><span><a href="cant_post_link_yet9">Graphics and Print</a></span></li> </ul> </li> What's the correct jQuery code so that I can modify the href attribute for the first-level list only? Basically, I want to change the href of Technology and Design to be "#" but will not change the href of Web Design which is already on second-level list. More Info: In the code above, if list has subcategories, then it has the class has_child, whether it's on first-level or not. So I want only the first-level list which has class has_child to be modified the href to "#" I can't alter output anymore because it's in the PHP code. Any help is greatly appreciated.

    Read the article

  • jQuery: Show tooltip without link

    - by bloggerious
    Is it possible to show a tooltip without making a link? For example, I have the following code without a link: <ul class="letters" title="This is the title"> <li>A</li> <li>B</li> <li>C</li> </ul> So how can I show the tooltip "This is the title" when I mouse over on it? Btw, I don't want to use any tooltip plugin.

    Read the article

1