Usually its fine to check if the id exist, and much sure its unique across pages. If the id doesn't exist, nothing happens.
Jörn On Wed, May 20, 2009 at 4:00 PM, KD <ess33...@yahoo.com> wrote: > > 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(document).ready(function() { > jQuery("#faq_accordion").accordion(); > }); > } > > Is this even necessary? Sorry in advance if this is more of a > javascript question.