jquery

jQuery nth child

Is it possible to get jQuery to do the same job as nth:child(odd)? So that I can add zebra lines to tables in browsers like IE6? If so can someone help? ...

How to populate a series of checkboxes from a hidden csv field using jQuery

I have a form with a bunch of checkboxes, and a hidden field that contains CSV data. Basically, I need the checkboxes to be ticked based on the value of the hidden field: <form> <input type="checkbox" id="01" name="01" /> <input type="checkbox" id="02" name="02" /> <input type="checkbox" id="03" name="03" /> <input typ...

jQuery Syntax Help

Hi guys, I need some help with jQuery syntax. I'm trying to modify the opacity effect in the code below to something like fadeIn. jQuery("#featured").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true); Thanks in advance for any help. Sam. ...

javascript not executing on page load?

in my html: <head> <link href="/prop-view.css" media="screen" rel="stylesheet" type="text/css"> <script src="/javascripts/jquery-1.3.2.min.js" type="text/javascript"></script> <script type="text/javascript"> var $j = jQuery.noConflict(); </script> <script src="/prop-view.js" type="text/javascr...

Is there a better way to deal with this JSON data

I'm just getting my feet wet with jQuery after beginning to read Sitepoint's "Novice to Ninja" but, as always, I'm left wondering if there's a better way to write the code I've come up with. As it turns out, the answer is almost always and emphatic "yes." All these "if" statements seem ridiculous. How can I do this better? What funct...

jQuery how to close dialog from iframe within dialog?

If I open a dialog like so: $('<iframe id="externalSite" class="externalSite" src="http://www.example.com" />').dialog({ autoOpen: true, width: 800, height: 500, modal: true, resizable: true }) How can I close the dialog from withing the iframe? ...

Reordering tables nested rows

Hi, I am improving a CMS I have built and wish for the user to be able to reorder pages using drag and drop. I have table drag and drop for jquery: http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/ however I wish to be able to 'group' rows together and move them within only the group. In the CMS I have a list of top lev...

Layout / Javascript issues with Internet Explorer 8

I'm using the Facebook async javascript loader to load the new JS SDK (all.js). I want to load a set of html via AJAX and then parse the result. Not surprisingly it works great in Firefox and Chrome but IE mangles the result where a profile pic appears to be set to float over the other fields and I've got three other divs (status-conte...

Get all CSS styles of an element with JavaScript

Hi. Is there a way to select all CSS rules of an element with JavaScript? I'm not looking for a specific solution, just as long as all CSS rules of a given element are read. So, I have the following HTML <div class='styledDiv' style='height:100px;width:100px;'></div> and then in a separate CSS file: .styledDiv { background-color:...

assigning value to a select box

Hello i have a variable in jquery with the string "tuesday" in it, i also have a selectbox with all the days of the week in it, how can i assign my variable so that the selectbox automaticly selects my variable? ...

JQuery: Cluetip questions - Turning off tips and maximum height

How do I turn off the tips temporarily? I see the ability referenced on the website a couple times, and in this forum as well, but for some reason I can't find the command that turns them off. I just need to disable them for a bit, then re-enable them. Is there a way to give a tooltip a maximum height? I have a bunch of tooltips, som...

How can I clone a row in a table without cloning the values of the input elements inside it?

I am trying to add a row to a table. I found that we can use the clone() method to duplicate an existing row. My table has two text inputs in it in two different <tr> elements. Cloning the last row is also duplicating the values in my text inputs, which I don't want? How can I clone the row without duplicating the values? Here's what ...

Is it possible to use multiple variables instead of selectors in jQuery

I know that it's faster to do the following: var $header = $("#header"); $header.css({color:"#ff0000"}); $header.find("a").addClass("foo"); Instead of: $("#header").css({color:"#ff0000"}); $("#header a").addClass("foo"); Because jQuery doesn't need to find the elements again in the DOM as we have direct reference to them. Let's sa...

blockui on blockui

Hi, I tried to put a blockui on top of another blockui, and it works (provided the baseZ value is higher for the second blockui of course) The problem is when I want to close the top-most blockui with the $.unblockUI(); call, both close. Is there a way to set a namespace or context? I did not find anything related so far on the web. ...

jQuery - Click call function and click function

Basically when I click a button I want to call a function and run the button click function: This jQuery runs when the page loads: jQuery( document ).ready( function ( $ ) { $('ul li:first-child').addClass( 'first_item' ); className = $('.first_item').attr('id'); alert('Date is:'+ className +'.'); }); And this jQuery runs when ...

SlideToggle imperfections

My slideToggle is a little jumpy at the bottom of the slide transition. Could that be because there is a button there or something. Any way to make it smoother. Tried using easing but not very successful. Any suggestions click on video setup to see for yourself The site $(document).ready(function() { $('.drop').click(function() { ...

Add row to a table with Jquery,but don't need its value

Possible Duplicate: How can I clone a row in a table without cloning the values of the input elements inside it? i am trying to add a row to a table.i found that we can use clone . my table has two text boxes in it in two different tr's .cloning the last row is also duplicating the values in my textbox's which i don't want ?An...

jquery_update for Drupal does not get added to the page for non admin users

Hi, I have installed jQuery_update for Drupal because I needed an up to date version of the library. In my theme I have this line adds the scripts to my page: It works perfectly when I am logged in as an administrator. jQuery_update will appear in the source code and take control. The problem is when I am not authenticated: no jQuery ...

resizing div issue in jquery

Hello guys, Please open this file in google chrome : http://jqueryui.com/demos/resizable/ It doesn't work properly. When you mouse over the edges, your cursor will change but when you start dragging the cursor changes again, cursor not persistent how can I fix this ? ...

jquery only gets executed 1 time

Hello guys, I have a function in jquery that looks like this. function interceptFilter(e){ $.ajax({ type: "POST", data: $('#formContent form').serialize(), url: "index.php?page=filter", timeout: '3000', error: function(XMLHttpRequest, textStatus, errorThrown){ alert('Error loading HTML document: ' + textStatus + ' - ...