I have a menu like this:
<ul class="leve1">
<li>
<div class="some">
<a href="images/image1.jpg">image1</a>
<a href="images/image2.jpg">image2</a>
<a href="images/image3.jpg">image3</a>
...
</div>
</li>
...
</ul>
and I also have a div in another location in my html
<div id="dest"></div>
I want to click in the link and make the image appear in the div. I've tried some codelines like
$(document).ready(function () {
$("div.some a").click(function (event) {
event.preventDefault();
$("div#dest").html($("<img>").attr("src", this.href).fadeIn(1000));
});
});
but it doesn't do anything. The div remains blank.
I've searched these forums but couldn't find an adequate answer.
Update
I also have some javascript to make the above menu a colapsing one. Can these intructions (hide, show and toggle - a bunch of them!) be colliding with this code???