[jQuery] Ignoring tags already affected by .addClass()

2006-12-04 Thread digital spaghetti
Hey folks, I'm making headway with my Drupal module I am working on, but have hit a problem. On the front page of Drupal, I generate a jQuery .addClass() function for each node that is displayed on the page, and this is fine. For example, for the first node I get this in my header: script

Re: [jQuery] Ignoring tags already affected by .addClass()

2006-12-04 Thread Alex Cook
' in the id field. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of digital spaghetti Sent: Monday, December 04, 2006 9:48 AM To: jQuery Discussion. Subject: [jQuery] Ignoring tags already affected by .addClass() Hey folks, I'm making headway with my Drupal module

Re: [jQuery] Ignoring tags already affected by .addClass()

2006-12-04 Thread digital spaghetti
' in the id field. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of digital spaghetti Sent: Monday, December 04, 2006 9:48 AM To: jQuery Discussion. Subject: [jQuery] Ignoring tags already affected by .addClass() Hey folks, I'm making headway with my

Re: [jQuery] Ignoring tags already affected by .addClass()

2006-12-04 Thread Jörn Zaefferer
digital spaghetti schrieb: Since drupal_add_js allows me to mix PHP variables with jQuery code I could change the I'd selector to be specific to the node I'd (I.e id=node-14, id=node-15, etc) as drupal always automatically generates this. If anyone can think of anything else, it will be

Re: [jQuery] Ignoring tags already affected by .addClass()

2006-12-04 Thread digital spaghetti
To be honest, I don't know how to currently with drupal, I've looked through the docs but currently haven't found anything to allow me to affect the node's class tag. This way seemed like a quick workaround way to do it, and as far as I could see drupal_add_js was designed to be able to do stuff

Re: [jQuery] Ignoring tags already affected by .addClass()

2006-12-04 Thread Erik Beeson
What you're talking about trying to do with .addClass doesn't make sense. It sounds like you want something like what Alex described. How do you expect to map from node number to class name? --Erik On 12/4/06, digital spaghetti [EMAIL PROTECTED] wrote: To be honest, I don't know how to

Re: [jQuery] Ignoring tags already affected by .addClass()

2006-12-04 Thread digital spaghetti
Easy enough. My module uses a hook into drupals views, when a node is about to be rendered to the screen, I have a function that generates a hash based on the url of the node id. Then using drupal_add_js, I write out the jQuery function and drop in the vars from the module's php code (naybe not