Does Prototype.js support custom pseudo-selectors?
That is, can I define a selector called "shiny" and do ... ? $$('div.shiny') //undesired -- class based $$('div:shiny') //desired -- logic based This is available in MooTools and jQuery. ...
That is, can I define a selector called "shiny" and do ... ? $$('div.shiny') //undesired -- class based $$('div:shiny') //desired -- logic based This is available in MooTools and jQuery. ...
Hi, I want to implement the jQuery autocomplete using json. This is my setup: JS code: $("#searchstring").autocomplete("/cities/<countrycode>/<citycode>/json", { parse: prep_data, formatItem: format_item }); prep_data = function(data){ tmp = $.evalJSON(data); parsed_data = []; for (i=0; i < tmp.length; i++...
I have searched for a bit on a basic example on using the John Resig JavaScript Micro-Templating engine on google but came out dry. I decided to bring it to base guys. Can anyone help with a simple example on using this engine? I have never used a client side template engine before. Update: This is the complete html document. Thanks to...
Having a bit of problem debugging my jQuery code... In order to allow hover effects on block elements (such as div) in IE, I want to use jQuery to do the trick instead of css. My jQuery code looks something like: $(document).ready(function() { $("div.foo").mouseover(function(){ $("div.foo h3").addClass("hover"); ...
HI, I am trying to validate a radio button form that has an unknown amount of radio groups. So far I have this: var object = $(".radio:checked"); var length = $('#numq').val(); if(object.length==length) { return true; } else { var unchecked = $(".radio:not(:checked)").empty(); var q = ""; unchecked.each(function(){ ...
Hi, I have a unordered list like the one below: <ul id="tabs"> <li><a href="#tab1">latest news</a></li> <li class="active"><a href="#tab2">latest posts</a></li> <li><a href="#tab3">latest posts</a></li> <li><a href="#tab4">latest posts</a></li> </ul> I can't find a jQuery selector that gets the next list item ...
I have a div <div id="maindiv"></div> and some checkboxes to add some html element inside that maindiv. When i check that checkbox, i need to append <div id="subdiv"></div> after checking that it doesn't contains that element. The subdiv id will vary according to the checkbox selected. When i uncheck the checkbox, i need to remove the ...
Hey Everone Does anyone know how you create a menu with this rollover effect. Is it using jquery? I'm want to create something similar using wordpress as my CMS. Would be great if there is a wordpress plugin? http://wptheme5.mipdesign.com/ Thanks for your help Rgards Judi ...
Hi, I can't figure out the errorPlacement method of the jQuery validation plugin - for use with my checkboxes anyway. I want to just make the script show/hide a label if there's an error. Does anyone know where I put my code to be triggered when the validation finds an error? I think I can use success: to make it hide the label. This ...
I'm looking for a good way to get cells X-Y position in a table. (do not confuse it with css-position, I am looking for X and Y coordinate in Cartesian coordinate system). As we know, we can get particular cell in a table using ex: $('#grid')[0].rows[5].cells[7]. But, what if I want to get the value 5x7 when I click on particular cell,...
So I was able to make it work, nothing difficult however I have a small problem. if the tutorial/article has a rating of 5 then 5 stars will be yellow, same if it is a rating of 4 or 3. But when the rating is 0 it will still make the first star yellow instead of making them all grey. I'm using the plugin found on http://zensoftware.org/...
I have a big div wit a lot of smaller divs within it. Say, <div id="parent"> <div id="child1"> </div> <div id="child1"> </div> <div id="child2"> </div> <div id="child1"> </div> <div id="child1"> </div> </div> If I'm currently at the last 'child1', how dow I get to the top most child1 with prev()? For me it breaks when it...
I'm trying to use YUI uploader, but I'm not able to open the file dialog window when I click the browse button. I'm following (more or less) the example on Yahoos demo. Here is my HTML code: <div id="fileProgress"> <input id="fileName" type="text" size="40" /> <input id="uploaderUI" name="uploaderUI" class="submitButton" type="butt...
Hi, I have couple of forms on my php page. I am using jQuery (& Ajax) to process this page and show the results. Let's call the forms as: ToDo and Register forms. I have submit events attached to both the forms so that their corresponding processing takes place on submission. The ToDo form is located towards the top of the page and the R...
So if I have an array of 2 values and I want to apply those values to two elements, I can't seem to figure out a way to loop through the selected elements and have a counter or something to represent the index of the array value I want to apply. Anyone? For example: myTotal = new Array("7.00", "10.00"); <input class="theTotalInput"><...
Hi all, I get this error on a .click() event in jQuery. I see it in Firebug. I use the latest version, 1.3.2 (min) The click fires an $.ajax() request for a Form in my website. I asked google about this and all he knows is "%" or "[@]" as unrecognized expressions, nothing about the "#". here is a bit of my code: $("form#buyForm #su...
I've got a simple setup using jQuery UI's default sortable/draggable functionality. I now need to add a 'palette' which will will be a list of all items in all lists (and some that may not be in any lists). Like this: <ul id="palette" class="ui-sortable"> <li class="used">A</li> <li>B</li> <li class="used">C</li> <li class="used">D...
Hello, I have to pages one Index.html <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>index.html</title> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script...
Hello, I've got two functions and one problem. hideTable(); ajaxCall(params); The function hideTable function hideTable() { if (effects) { $('#jquerytable tbody').fadeOut(speed); } } I want the ajaxCall function to be executed after the hideTable function (which takes a little time). The showTable function should be e...
I closed my old blog so I redirect our old blog to our new blog but if any user comes from the old blog then he can't watch our video in our blog.. i used <script language="javascript" type="text/javascript"> window.onload = function java() { window.location = "http://anirudhagupta.blogspot.com"; } </script> But he r...