2013-03-22, 01:36 PM
I figure I'm not the only person who struggles with jQuery, particularly in the context of 1.6 where everything you do is likely to conflict with prototype. Rather than make new threads every time I have a question, I'm hoping some other people can get some use out of this thread.
So what I'm trying to do now is that on click, a div is hidden and another div takes its place. I've tried a few implementations I found on Stack Overflow and none of them seem to work. This is the last one I tried.
help?
So what I'm trying to do now is that on click, a div is hidden and another div takes its place. I've tried a few implementations I found on Stack Overflow and none of them seem to work. This is the last one I tried.
<script type="text/javascript">
jQuery.noConflict();
jQuery(function () {
jQuery(".div1, .div2").hide();
jQuery(".loginlink, .registerlink").bind("click", function () {
jQuery(".div1, .div2").hide();
if (jQuery(this).attr("class") == "loginlink")
{
jQuery(".div1").show();
}
else
{
jQuery(".div2").show();
}
});
});
});
</script>
help?