[jQuery] Toggle element based on value

[jQuery] Toggle element based on value


Hi,
How do I toggle a div based on the div's value?
Example: The site I am working on has multiple blog posts per page. Under
each post is a menu. One of the menu items is for emailing the story.
Under this there is a div that will display the email form. This div is
hidden by default. The link is as follows:
# id ?>">Open Email Interface
This div is:
<div class = "newsitememail" value = "<?php echo $stroy->id ?>">
My logic so far has been to grab the link's id using jquery and then display
the appropriate div based on the value (which is the same as the id in the
link).
Here is the jquery code so far:
$("a.emailitem").click(function(){
    
    var id = $(this).attr("id");
}
How do I toggle the correct div?
--
View this message in context: http://www.nabble.com/Toggle-element-based-on-value-tf4009643s15494.html#a11387034
Sent from the JQuery mailing list archive at Nabble.com.