Wednesday, December 30, 2009

[jQuery] Re: Toggle link Needs to Be UNDERNEATH!!!

Not sure where, but this is it...

Still doesn't work.

<!DOCTYPE html>
<html dir="ltr" lang="en-CA">
<script src="/src/js/jquery/core/jquery-1.3.2.min.js" type="text/
javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('[class^=toggle-item]').hide();
$('[class^=link]').click(function() {
var $this = $(this);
var x = $this.attr("className");
$('.toggle-item-' + x).toggle();
return false;
});
});
</script>


<body>

<div class="SomeOtherClass"> foo </div>

<a href="#" class="SomeClass">More Details</a>


sasasa

<div class="SomeOtherClass"> foo </div>

<a href="#" class="SomeClass">More Details</a>

</body>
</html>

No comments: