I have a simple ID I want to fadeOut with jQuery after a button. However, when clicking on the respected button it doesn’t work and nothing happens. Heres how I get JS file from different location like this:
<script src="http://myflashpics.com/v2/jQuery.js"></script>
<script src="http://myflashpics.com/v2/actions.js"></script>
Here’s my action in my actions.js file:
$(document).ready(function() {
$(function() {
$(".profileLink").click(function() {
$("#right_bar_content").fadeOut("slow");
});
});
});
Here’s some other HTML assosiated with it:
<img src="http://myflashpics.com/get_image.php?short_string=avqc&size=thumbnail" class="profileLink" />
<div id="right_bar_wrapper" id="right_bar_content">content here</div>
Please help!
Coulton
First of all, you shouldn’t have two separate ids for your div. Get rid of the
right_bar_wrapperid and merge the CSS for the two ids.Second,
$(is just short-hand for$(document).ready; it shouldn’t be nested. Remove one or the other.