In a simple world the function i'm trying to perform is:

  $(document).ready(function(){
    $("button").click(function () {
      $('.cars>#seats').slideToggle("slow");
    });
  });

But I'm working in Wordpress.  What I'm trying to do is for each entry be
able to toggle the main content of the entry to either a hidden of visible
state.  When a person clicks a button which is placed within the post next
to the title text, the visible state of the main content is toggled.  Using
the simple example I can easily toggle static content, but I believe my
issue to lie in the fact that the post ID is derived from PHP.  How do I
solve the issue?

I've tried:

  $(document).ready(function(){
    $("#post-\\<\\?php the\\_ID\\(\\)\\; \\?\\>>button").click(function () {
      $('#post-\\<\\?php the\\_ID\\(\\)\\;
\\?\\>>.content').slideToggle("slow");
    });
  });  
*Which i thought to use after checking the jQuery FAQ
and also tried:
  $(document).ready(function(){
    $("post-<?php the_ID(); ?>>button").click(function () {
      $('#post-<?php the_ID(); ?>>.content').slideToggle("slow");
    });
  });

Neither worked.  Please help me out!
Thanks in advance
-MP



-- 
View this message in context: 
http://www.nabble.com/How-do-I-reference-PHP-for-an-ID-value--tp20573038s27240p20573038.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to