[jQuery] How to use conditional tags to identify a page in Wordpress - is it necessary for jQuery?

2009-05-20 Thread KD
I understand how to use conditional tags to identify a wordpress page with php: if (is_page('Home')) {run function here} Can (should?) this be done with jQuery also? For example, I would like to run the accordion widget on a F.A.Q. page only. Could I do something like this: if (is_page('F.A.Q

[jQuery] How to add a cookie to toggleclass

2009-05-14 Thread KD
Hi, I'm using Wordpress and each post will have a table. I'm using the following script to allow users to highlight a table cell when they click on it. It works with jQuery ui extension and the effects core plugin: jQuery(document).ready(function() {jQuery("td").click(function() { jQuery(this).

[jQuery] adding fadeIn/fadeOut effect to toggle or toggleclass

2009-05-12 Thread KD
The following works very well to highlight a table cell with a background color when the cell is clicked: Code: jQuery("td").toggle( function () { jQuery(this).addClass("highlight"); }, function () { jQuery(this).removeClass("highlight");}); This also works with toggleClass: Code