jquery

jQuery plugin to allow name/value properties in "class" attribute?

I have a bad cold. I was awake late last night, or sort-of awake, and I was just looking through Stackoverflow questions. I came across mention of a jQuery plugin (or maybe it was native jQuery) that allowed named properties to be coded into "class" strings and then extracted: <span id='mySpan' class='something {toggle: checkbox2, toggl...

jQuery FadeIn loses transparency on IE

Hi, I'm having a design issue using jQuery FadeIn on Internet Explorer: I have a div which animates from the bottom to the center of the page, I needed to implement the effect that the div suddenly fades in and animates to the center of the page. I got that effect using jQuery FadeIn, but I lose the transparency of the div just on Inter...

server side / client side email validator differences

I'm using the native jQuery validation library to validate email addresses entered in a contact form. Since this is an Expression Engine site, I'm using its email validator as a server side backup. When I enter [email protected], jQuery says it's valid but when submitted, the Expression Engine validator says it is not valid. I know that validat...

How can I unbind JQZOOM in my JQuery Script?

Hello, I have this script at the moment, which changes an image when a thumbnail has been changed. I then want JQZOOM to be added to that new image. However, if I put it inside the Onclick event, it gets slower and slower the more times you click on it... I guess because its running multiple instances. Is there anyway to unbind the JQZ...

jQuery.form resetForm() isn't resetting a select box to default selection

I have a function that clears all the elements inside a span id. clearForm() works but resetForm() does not. `<script type="text/JavaScript">` ` $(function hideMe() { ` ` for(i=0;i<arguments.length;i++) {` ` $("#"+arguments[i]).clearForm().fadeOut();` ` }` ` });` `</script>` `<html>` `...<td><input ...

Is there a way to fire jQuery's live() or delegate() without a user event?

I am trying use jQuery to poll dynamic DOM nodes, created outside of the jQuery object (with Google Maps API methods). I can do this easily by, for example, binding delegate() to a click event. However, I need to poll the DOM, without any additional user actions (user should not have to click), as part of a function that runs onload. Doe...

Get penultimate element

Hi, Is there a way in jQuery using selectors to identify the penultimate element? Is there something like a :last-1? The list can be any length so i cant use 'eq' Any help would be much appreciated. A. ...

How to use jquery to populate a second select list based on a first selected option.

Hi, I am trying to dynamically change the options in a second select list using jquery depending on which item in the first select list is selected. The second select list also needs to have optgroups in it. How would I go about doing this? Thanks ...

Ajax: Wont TimeOut after commenting twice?

Hello. I have this for inserting a comment: <script type="text/javascript"> function onInsertComplete(data,textstatus){ $("#insert_response").html(data); if ($("#box[value=1]").length > 0) { window.parent.showMessage("Video Is OK"); } } function DoInsert(){ $("#insert_response").html("To Sek..."); var...

jQuery - set div width to sum of it's children

Hello, I have following setup: html: <div id="holder"> <div> <img/> <img/> </div> </div> css #holder { width: 800px; } now, i want to make jQuery gallery and will move line of images to the left and right with negative margin-left of inner div. However, I have to tell <img/>s to float to left and set inner div's widt...

jquery how to catch enter key and change event to tab

I want a jquery solution, I must be close, what needs to be done? $('html').bind('keypress', function(e) { if(e.keyCode == 13) { return e.keyCode = 9; //set event key to tab } }); I can return false and it prevents the enter key from being pressed, I thought I could just change the keyCode to 9 to make it tab ...

Looping Through Multiple JSON Requests (YouTube Data API)

Part of a website I am working on is a video page. I am pulling the videos from a YouTube account by accessing the YouTube Data API. Grabbing the videos in no particular order and not sorted works fine, but when I try to sort them into categories, I start running into trouble. Let's say there are three categories, Fruit, Vegetable, Pets....

jquery, selector, style

HI, How can I add by jQuery, some class "test" just to what have style="display:none", Output: <tr style="display:none" class="test"></td></td></tr> <tr></td></td></tr> <tr style="display:none" class="test"></td></td></tr>> <tr></td></td></tr> Thanks ...

Running a function on a dynamically added class

I have a button that when clicked inserts a form input field and a button (to delete) into the form using JQuery .after(). This works fine. The button that is inserted has a function .click that should run when it is clicked - it is not working. <script type="text/javascript"> $("#addAQuestion").click(function(){ var be...

jQuery - DatePicker showing up on top of text input field.

I have a form with a TextField for entering a date. I have a DatePicker "set" on this field. However, it appears on top of the field. I do not want it to obscure the text field. How do I go about doing this? ...

Periodically Animating-up a Number with Javascript

I've got an element on my page that I would like to increment from time to time: <p class="count">28</p> Within my javascript, I have an interval that runs once every 5 seconds and asynchronously grabs the new (higher) number from the server. This functions somewhat along the lines of a counter. setInterval(function(){ $.post("getc...

Better jQuery code to select a radio button if none are selected?

I have this code, which works fine: if ( $('table#attribute_Size input.quantitycheckbox:checked').length == 0 ) $('table#attribute_Size input.quantitycheckbox:first').attr({ checked: true }); As you can see though, it's pretty long and most of the selector is repeated. Is there a neat was to shorten it? I tried this but it doesn't...

jQuery .live() causing parallel loop

Let's get down to it; Click an AJAX-inserted LI element, popup a dialog box with a text input, when the input is above 100, submit the information for verification against the server. Here's what it looks like: $("li").live("click", function() { $("#dialog1").dialog('open'); $("#pin").focus(); $("#pin").keyup(function() { ...

jQuery YensDesign POPup

I am very new to JS so, please be easy on me... So i am using YensDesign popup, that i figured out how to attach to a image map. <img src="/_images/bhm-circle-chart-members.jpg" width="504" height="504" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="poly" coords="90,63,128,110,150,95,177,80,202,71,229,65,250,65,249,...

Jquery: Conditional reference to attribute?

Hi, Is it possible to refer to an attribute of an element conditionally with Jquery? What I'm after is something like: $(".mylink":rel["2"]).show(); ... which would "show the specific instance of .mylink element on the page that has rel="2" HTML attribute on it. There would be multiple instances of .mylink on the page, each with its...