[jQuery] Targetting .class-0 .class-1 .class-2 .class-3

2008-12-03 Thread light-blue
This is a beginner question. Does anyone know how to target $('.jquery-calendar-0') $('.jquery-calendar-1') $('.jquery-calendar-2') $('.jquery-calendar-3') etc... I need to run the following, where X is the number, but I don't know how many X exist until after the page renders.

[jQuery] Re: Targetting .class-0 .class-1 .class-2 .class-3

2008-12-03 Thread light-blue
calendar2/div div class=jcalendar calendar3/div Then you could grab it with $('div.jcalendar'); JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of light-blue Sent: Wednesday, December 03, 2008 5:40 PM To: jQuery (English) Subject

[jQuery] if ($(event.target).is('a.edit')) with img

2008-10-02 Thread light-blue
Hopefully simple problem. I click an img link, html like this a class=edit-building href=/edit-building/145 img src=icons/edit.png/ /a jquery like this if ($(event.target).is('a.edit-building')) { var building = function (data) { ..do stuff } $.get(event.target, null, building);

[jQuery] Re: if ($(event.target).is('a.edit')) with img

2008-10-02 Thread light-blue
the simple click function? $('a.edit-building').click(function(){     //do stuff      return false; }); On Thu, Oct 2, 2008 at 14:43, light-blue [EMAIL PROTECTED] wrote: Hopefully simple problem. I click an img link, html like this a class=edit-building href=/edit-building/145 img src=icons

[jQuery] using click() with $(event.target).is(something)

2008-09-22 Thread light-blue
I'm a Jquery newbie, so if this answer is available somewhere, please let me know. My user needs to click button B, which processes some info with AJAX (working great), and then needs to programmatically click button A, which itself runs an AJAX request. Button B works fine, but when it tries

[jQuery] Re: using click() with $(event.target).is(something)

2008-09-22 Thread light-blue
I think Andy might be correct about the binding issue. Since I'm relatively new to jquery, I'm likely missing something basic. Below is code sample... // $Id$ // Global killswitch if (Drupal.jsEnabled) { $(document).ready(function(){ $('body').click(function(event) {

[jQuery] What does 'return false' do?

2008-09-19 Thread light-blue
What does 'return false' do? I make an AJAX request from an HREF, which works. But the resulting page needs Javascript to run on it. I think 'return false' is preventing it. How do I fix that? Here's what I've read so far from the Chaffer / Swedberg book: If we wish to halt both, we can return

[jQuery] Simple Q: Javascript fails on JSON data

2008-09-18 Thread light-blue
This is simple, but I'm lost. I click a link, and jquery loads a form using jquery and JSON (works great!) But, the form has collapsible fieldsets (using Drupal's collapse.js) and the javascript doesn't run on them. That's probably because the collapse.js needs to run on the newly loaded form