Resolved - Unable to activate slideup/down from within ajax
I did a search and didnt find an answer so hopefully I can get some help.
I have a page that I am using, where when a link is clicked a div on the page has its content changed based on which link is clicked. I use jquery to cause the Div to slide into existence when the link is clicked. What im trying to do now is make it so that, when an image is clicked from within the div, that it slides out of existence again.
-
<script language="javascript">
$(document).ready(function() {
$('#toggleButton').click(function() {
if ($('#toggleSection').is(":hidden"))
{
$('#toggleSection').slideDown("slow");
} else {
$('#toggleSection').slideUp("slow");
}
});
});
</script>
That code works great for the menu, making the div slide into and out of existence. However the menu is a drop down menu and I'd like to be able to close the div without having to go back to the menu. So I tried putting an image into the content that gets loaded, with a link similar to the ones in the menu, but when it gets clicked nothing happens.
I've tried a number of different things, from creating a special function for it, to assigning extra classes and trying to catch the click by the images class instead of its ID, ive made sure that clicking on the image was working but inserting an Alert and that worked, but the slideup/down did not.
Here's a link to an example
http://www.vaughansweb.com/testjq/