Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do a hidden html <div> visable with a javascript function?

I'm trying to do a hidden HTML <div> visible, by running a JavaScript function.

This is the hidden div I want to get visable with a JavaScript function:

<div id="Signup" class="modal hide fade LoginSignup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2" aria-hidden="true"> 
    Some content* 
</div>

Right now I'm using this button to show the hidden div content:

<li>
    <a href="#Signup" role="button" data-toggle="modal" class="btn btn-success">Sign Up</a>
</li>

Is this the best way to do it? Or is it an other way to get a designable pop up window?

like image 744
Murillio4 Avatar asked Mar 26 '26 21:03

Murillio4


1 Answers

You can also try out jQuery toggle

http://api.jquery.com/toggle/

like image 122
Duleendra Avatar answered Mar 29 '26 11:03

Duleendra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!