I am making something like this
Tryit Editor v1.4
I want to add a thing in it i.e when i click the button , the text should be hidden again .
Can anyone help me out ?
1 reply to this topic
#1
Posted 12 June 2011 - 04:17 AM
|
|
|
#2
Posted 12 June 2011 - 10:48 AM
Well, that tutorial is made for ajax loading... not really a good context to go hide/show stuff.
<script type=[B][COLOR="#008000"]"text/javascript"[/COLOR][/B]>
var visible = true;
$(document).ready(function(){
$([B][COLOR="#008000"]"button"[/COLOR][/B]).click(function(){
[B][COLOR="#000080"]if[/COLOR][/B]($([B][COLOR="#008000"]"div"[/COLOR][/B]).is(':visible')){
$([B][COLOR="#008000"]"div"[/COLOR][/B]).hide();
}[B][COLOR="#000080"]else[/COLOR][/B] {
$([B][COLOR="#008000"]"div"[/COLOR][/B]).show();
}
});
});
</script>
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









