javascript - jquery, replace one hyperlink link with another hyperlink? -
in html page have 2 hyperlinks.
<a href="#" id="demo1" onclick="onclick_demo1()" >demo1</a> <a href="#" id="demo2" onclick="onclick_demo2()" >demo2</a>
when click demo1
hyper link.. demo1
hyper link replace demo2
hyper link.
as when click demo2
hyper link.. demo2
hyper link replace demo1
hyper link .
i'm doing this..
$(document).ready(function() { $('#demo2').attr('disabled', 'disabled'); }); function onclick_edit(){ $('#demo1').attr('disabled', 'disabled'); }
suggest me..
try one..
<script> $(document).ready(function() { $('#demo2').hide(); }); function onclick_edit() { $('#demo1').hide(); $('#demo2').show(); } function onclick_edit() { $('#demo1').show(); $('#demo2').hide(); } </script>
Comments
Post a Comment