Jquery css show div?

后端 未结 2 1221
悲哀的现实
悲哀的现实 2021-01-27 22:54

Ok this is my problem that no one can seem to answer. I have two javascripts in use. Once is for the popup I have and tells it to stay closed for 24hrs when closed. The other is

相关标签:
2条回答
  • 2021-01-27 23:28

    Your syntax is wrong, Try

    $(document).ready(function() {
       $("#linkshow").click(function(e) {
          e.preventDefault();
          $("#window").show();
       });
    }); 
    

    Works for me: See jsFiddle

    0 讨论(0)
  • 2021-01-27 23:41

    You need to wrap your code in a DOM ready handler, and you also missed the brackets following the function declaration. Try this:

    <script type="text/javascript"> 
        $(function() {
            $("#linkshow").click(function() {
                $("#window").show()
            });        
        });
    </script>
    
    0 讨论(0)
提交回复
热议问题