jquery

A way to chain selectors like this in jQuery? input:checked:not(:hidden)

I want to get all inputs that are checked and not hidden This doesn't work: .formyform input:checked:not(:hidden) Is there a simple way to do it? I couldn't find any example on the jQuery site ...

Using jQuery to do a Partial Page refresh but ignore some elements

I'm using the technique outlined here to do a partial page refresh periodically. What I was wondering is if it is possible to do a partial page refresh but not refresh some elements within the div that is being refreshed? I have some checkboxes that lose the checked state each time the page refreshes. I would like to not refresh these ...

Trigger event on a page when a popup window is closed

Page x creates a pop-up window (page y). When page y is closed, I need an event to trigger on page x. Any help is appreciated. Thanks. ...

difference between json and ajax? when should what be used?

Hello I am completely confused between json and ajax. When would what be used. I work with PHP on the server side. I regularly use ajax to receive data asynchronously, without invoking a page load. I use php's json functions to pass data to javascript. But I just started learning jQuery, and I am completely confused when to use function ...

Active menu class for current page

Hello, i'm making portfolio site template. I have problem about "active link" for my full ajax site. When i open url (http://bit.ly/d5qNeN) directly, url doesnt come up with addClass function. How can i add 'selected' class for directly opened urls? Here is my jquery code, which adds 'selected' class to my navi bar. $j("a[rel=...

jQuery .slideUp() not working in Chrome

I'm trying to make an accordion like section to a page I'm working on. I'm not using jQueries native accordion plugin because I need the ability to close all the sections. My problem is Chrome doesn't seem to be responding to .slideUp() while everything seems to work perfectly in Firefox and IE. Rather than try and copy all the relative ...

jquery ui dialog, having multiple dialogs affects position

Hello, As I am making multiple dialogs, I am faced with difficulties. Here is my code: var dialog_count = 3; $(function() { var left_value = 0; var top_value = 0; for(var i = 1; i < dialog_count+1; i++) { $('.dialog_' + i).dialog({ width: 263, position: [800 - left_value, 800 - top_value] }); left_value = ...

Prevent IE form submit on jQuery delegate 'submit' action

I am attempting to use jQuery's .delegate() function to catch a submit button press and prevent the page from being reloaded. It works fine in every browser I have tried, but Internet Explorer! Let me explain in code, I have this HTML which is dynamically generated by JS: <form id='submit-form'> <input type='text' id='blah' /> <in...

Jquery wrapAllInner() ? -- Or wrapAll() applied interally?

I'm trying to insert an opening <div class="container"> after <body> and a closing </div> before </body> I'd like for there to be a function like wrapAll() that would apply internally, on the html() of an element. Something like wrapAllInner() would be great. I've tried: 1) $('body').html().wrapAll('<div class="container"></div>'); w...

Which jquery overlay library is best?

I've used lightbox and fancybox quite a lot but never really seen any reason to choose one over another. There are also a whole bunch I have not used like these http://planetozh.com/projects/lightbox-clones/ . The data on that page is quite old and in many cases incorrect. Are there any good reasons to choose one over the others? Perfor...

appending content to a list using checkbox

Thanks to the invaluable assistance of several Stack Overflow participants, I'm very close to the desired results ... here's a recap and update, for interested parties: I have a series of product modules, each of which contains (among other things) the product's name and a 'compare' checkbox. My objective is to generate a list of select...

jquery google chrome

Hi, I am using the newest jqueryui and have a link on my homepage that bring a dialog with a form. Now on Firefox, IE and the others no problems. Only on chrome. it just won't work. You click and it's just quiet. Here is the simple code that gets the dialog: var diagopt = { autoOpen: true, title: 'Get a Quote Sent to yo...

jQuery .dialog on load()

I want do wrap error messages that appears (in #error div) and disappears from page to page in a jQuery UI dialog. Some of error messages are added dynamically by jQuery $('body').append('blablabla') or another insertion method. So this construction: $('#error').load(function() { $('#error').dialog({ draggable: false, ...

jQuery Validation Plugin Multiple Checkboxes

I am having some difficulty in using the jQuery Validator plugin. I have a list of checkboxes with different name attributes and I can't seem to figure out how to ensure that at least one of them has been checked. Everything that I find on Google seems to only work when the name attribute is the same. Here is some sample code (updated...

jQuery post problem

Could anybody help with this? I am trying to integrate a coupon function into the order process on my website using jQuery to post the coupon code used and check the coupon code used exists in my database. However jQuery post will not work correctly. Here is my code. jQuery(function () { jQuery("#discount-code").click(function () ...

Prototype > JQuery Conversion

Hi! I need to convert one script from Prototype to Jquery, but I'm no good with Jquery. If someone can do this, i will thank so much =) Here's the code in Prototype: // Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults replace_ids = functio...

Jquery: function runs twice

Why does my jquery function runs twice on click ? $("a").click(processAction); function processAction(e){ var clicked = e.target; //show apply button. $("#apply").live("click",function(e){ e.stopPropagation(); someFunction(clicked); alert("this the array " + mydata); cli...

Select radio button from a tr onclick

Here's my tr which is inside a form: <tr id="mlevel" class="__tr_class__" onclick="needFunction()"> <td class="checkbox"><input type="radio" name="membership" id="__ID__" value="__ID__" /></td> <td class="icon"><img src="__Icon__" width="60" height="60"/></td> <td class="name"><h2>__Name__</h2...

Simple JQTouch question about creating dynamic links to content

Hello, I've looked at many JQTouch tutorials but I haven't found a description on a simple thing: Given a list of items, how do you turn each item into a link that then brings up a dynamic page showing data about that item? Here is the flow I what I want to do: 1) Present list of items 2) Item is tapped 3) an XML call is made to the s...

How to use jQuery/Javascript to fadein/out text after a while

On Envylabs' site they have a feature where, below the logo, some text keeps changing after a few seconds. I'm trying to find out what kind of JS/jquery function would do that. Can someone point to a tutorial for this? ...