jquery show hide div's with a href tag
Posted
by
user1736794
on Stack Overflow
See other posts from Stack Overflow
or by user1736794
Published on 2012-10-15T14:05:24Z
Indexed on
2012/10/15
15:37 UTC
Read the original article
Hit count: 163
I have some jquery which reveals and hides new div's based on which button is pressed. Rather than buttons i would like to insert my own text/image and have them work in the same way, revealing and hiding the new windows.
Here is the jquery:
<script>
$(document).ready(function(){
$(".buttons").click(function () {
var divname= this.value;
$("#"+divname).show("slow").siblings().hide("slow");
});
});
</script>
Here is the code for one of the buttons which i would like changed to a a href tag.
<input type="button" id="button1" class="buttons" value="div1"></input>
Any help will be greatly appreciated. Thanks. Pia
© Stack Overflow or respective owner