jquery

Jquery not working in ie6

Hi all, I'm quite stuck on this It's working fine in firefox, chrome, safari, ie8(almost). But in ie6: no mouse interactions work; added like - $("#watch_but_link").mouseup and $("#watch_but_link").mouseover some css functions don't work; added like - $("#listen_tab").css("background-position","0px 0px"); There is a whole load of x...

How to add class on td trough Jquery

Hi, I have below html <table class="Newuser" cellspacing="0" cellpadding="0" border="0" id="ctl00_ContentPlaceHolder2_CreateUserWizard1"> <tr> <td> <table> <tr> <td> </td> <td> </td> </tr> </table> </td> </tr> <tr> <td> <table> <tr> <td> </td> ...

jQuery select items which parents are not of a given class

hi. how can select all nodes with class "myClass" whose parent nodes don't have class "myClass". for example, i have following HTML: <div class="myContainer"> <div class="myClass" id="d1"> <div class="myClass" id="d2"></div> <div class="myClass" id="d4"></div> </div> <div class="myClass" id="d3"></div> </d...

Why is document.body == null in Firefox but not Safari

I have a problem with a page where I am trying to get colorbox (a kind of lightbox for jQuery) working. It doesn't work apparently due to the document.body being null in FireFox (3.5.3). This is not the case in Safari (4.0.3) where the colorbox works. Something that jumps out at me is that (I'm using Drupal 6) drupal has appended a scri...

Not able to add text to hidden Input field

Hi, I have the following HTMl: <input id="brandID" name="brandID" type="hidden" value="" /> <select id="selectList" class="textfield70pc" name="selectList"> <option selected="" value="221">A</option> <option value="4673">B</option> </select> Upon changing the value of a select box, I need to populate this input field. I've tr...

jquery plugin default option modification once applied

Hi, Take the following example plugin: (function($) { $.fn.alertOnClick = function(text) { return this.each(function(){ $(this).click(alert(text)); }); } })(jQuery); that I might use like this: $('p').alertOnClick("this is a silly plugin"); How do I modify the plugin code to support doing the following: $(...

livequery - confirm()

I don't get why this confirm() call fires up even though i hit "no". Can you tell me what i'm doing wrong? $('.deleteButton').livequery('click',function(){ if(confirm('Are you sure?')){ return true; }else { return false; } return false; }); The HTML Markup: <a class=...

Applying more CSS properties within one line

Is there any possible way to apply more than CSS to a control through a single line of code.In below example i could i apply only one property $('#<%=lblMessage.ClientID%>').css("color", "#16428b"); Suppose if i would like to apply font or background.. how it is possible -Thanks ...

jquery ajax doesn't work in IE

Hello, i have the following function to add an article in my basket: $(".addtocart").click(function(){ var product = $("#pid").val(); var qty = $("#qty").val(); if(isNaN(qty) || qty == '') alert("ERROR"); else{ alert("HIHI"); $.ajax({ type:"post", ...

I want unescaped characters in my cookie (jquery)

Hello I want to store the href value in a cookie, trouble is when i do the cookie is escaping the forward slashes, so for example code is $.cookie ("mycookie", $link.attr("href"), { path: '/', expires: 7 }); html is <li><a id="czechrepublic" href="/cz/cz.html">Česká republika</a></li> When i store the href it is being stored as ...

Delay in receiving Ajax results using jQuery

I have a simple jQuery Ajax call which gets HTML results from a PHP file (which just executes a mysql query and formats the results in a list). The problem I'm having though is that this whole Ajax call takes about 12s to execute (the 'Waiting for Response' time in Firebug is 12.3s), but when I just load the PHP page with the same URL p...

jQuery - How to check for available javascript on a page?

On a html page that uses $.getScript to dynamically load .js files. Later at some point if I wish to check whether a particular .js file is loaded. How to do this? Can I check using filename.js? or do I have to check for an object/function/variable in that file? Thanks for the answers folks. You guys suggested callback function, gl...

Browser window close event

I want to capture the browser window/tab close event. I have tried the following with jQuery: jQuery(window).bind("beforeunload", function(){return confirm("Do you really want to close?") }) But it works on form submission as well, which is not what I want. I want an event that triggers only when the user closes the window. ...

Return value from ajax call?

Hi, I'm making a basic ajax function in jquery which echoes the number of rows found in a MySQL Query. function checkEventIDClass(id) { var params = 'method=checkEventIDClash&table=test&id=' + id; $.ajax({ type: "POST", url: "ajax.php", data: params, ...

using jquery to display words consecutively

I have a page that has 2 columns of words, 20 total, that are of a certain class (dim) and each a unique id. The ‘dim’ class defines the words as hidden. I have the following jQuery code running when I press a button: $().ready(function() { var x = 20; // will be dynamic later :-) $("#btn1").click(function() { f...

jQuery drop down question...

I'm writing my own simple drop-down...and it's not going so well. I need only the direct child of the list that's being hovered over to slide down. Also, it needs to stay down if the user is over the link OR the sub-menu. Thanks for the help!!! My basic HTML: <ul> <li class="media drop-down"><a href="#">L...

jQuery .live('click') only binding to first element on the page

I wrote a jQuery plugin that binds to 8 elements on a page, and I wanted to use .live() to bind the click action to a link in each element. When you click the link it should post a form using ajax. The problem is that all the links for all 8 elements submit the form for the first element on the page. When I use .click() everything works ...

JQuery Validation - Single rule for multiple fields?

This might be a simple question but I'm just picking this up so please be kind :) Using JQuery validation, if I want a textbox to be a required field I can just add a css class of "required" to the element and it is picked up by the validation. If I want a slightly more complex rule, ie. required with a minimum length, can I use a cust...

Validate Broken Up Time/Date jquery

Using this validation plugin I am trying to do a check to make sure start-date is before end-date The date is broken up into multiple drop downs. here is the start date html, the end is very similar I am using jquery to populate the fields with numbers and values, also using jquery to set the start date to a certain time and end date ...

jQuery :not() with multiple class on a table row

Hi folks, So basically I use jQuery for alternating row colours by selecting all the tr tags associated with the table to be coloured and then subsequently colouring them accordingly. There are certain times where I do not want a certain tr to be coloured, however, and in those cases the alternating colourization should skip over those ...