jQuery modal will not display when I click button

Matt Lee

I am trying to create a modal window that pops up when you click the sign in button in the nav bar. I've made it so both the modal and it's page overlay are set with 'display: none' in css. I've tried every method I could to get it to display on click and I just can't get it to work. I've tried fadeIn(). I've tried .css() to change it. I even tried making a special class with only 'display: none' and using .removeClass(). Nothing works!

This is a school assignment so I can't use jQuery UI. I'm not asking for it to be done for me. I just want a nudge in the right direction. Can someone help me? This is the code I've got right now.

$(document).ready(function() {
    $('#login').click(function(event) {
        event.preventDefault();
        $('.overlay').removeClass('.displaynone');
        $('.modal').removeClass('.displaynone');
    });
});

Here is a JS Fiddle with the whole situation out there. The Log In button is supposed to bring up the overlay and the modal on top of it. I'd like for it to fade in, preferably with the modal having a second delay.

Fiddle: https://jsfiddle.net/duagdn8m/1/

GibiDroidZ

https://jsfiddle.net/duagdn8m/5/ Just remove the . on the classname that you want to remove.

$('.overlay').removeClass('displaynone');
$('.modal').removeClass('displaynone');

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Display a Modal on button click using Jquery

From Dev

How to display jquery modal popup on mvc 4 button click

From Dev

display a dialog when i click a button

From Dev

display a dialog when i click a button

From Dev

Bootstrap Modal Button Click jquery

From Dev

Blank display when I click submit button from the form

From Dev

When i click edit button Dropdown value is not display using mvc?

From Dev

How to display a partial view as a popup/modal on button click using bootstrap or jquery?

From Dev

display a UserControl when click Button

From Dev

while loop shows only the last row in database when click at button[to display modal dialog]

From Dev

Bootstrap jQuery Modal not loading on button click

From Dev

Button click execute 2 times on modal jquery

From Dev

Closing the modal after i click on the button

From Dev

Closing the modal after i click on the button

From Dev

jQuery - product quantity not changing when I click plus button

From Dev

How to lanuch a post using javascript or jquery when I click a button?

From Dev

Update Progress GIF Image Can't be displayed when i click on a button in Modal pop Extender

From Dev

Pressing a button is supposed to start service and display text, but nothing happens when I click the button

From Dev

Display specific row data in bootstrap modal with edit button click

From Dev

How to display a difference modal popup According to click button

From Dev

how to pop display a modal upon click of a button nested in a loop

From Dev

When appending a font awesome icon in a button using jQuery the icon disappears when I click another button

From Dev

How To display text when we click button

From Dev

Script code will display when click button

From Dev

Modal Button Click Event

From Dev

When i click button ? Inserted value in edittext should be total and Calculate to display in another edittext with the help SELECT QUERY?

From Dev

Catch event click on button inside a modal created by jquery

From Dev

Map is getting appended to modal-body for each button click: jQuery

From Dev

ASP.net Button on click not firing using Jquery Modal Dialog

Related Related

  1. 1

    Display a Modal on button click using Jquery

  2. 2

    How to display jquery modal popup on mvc 4 button click

  3. 3

    display a dialog when i click a button

  4. 4

    display a dialog when i click a button

  5. 5

    Bootstrap Modal Button Click jquery

  6. 6

    Blank display when I click submit button from the form

  7. 7

    When i click edit button Dropdown value is not display using mvc?

  8. 8

    How to display a partial view as a popup/modal on button click using bootstrap or jquery?

  9. 9

    display a UserControl when click Button

  10. 10

    while loop shows only the last row in database when click at button[to display modal dialog]

  11. 11

    Bootstrap jQuery Modal not loading on button click

  12. 12

    Button click execute 2 times on modal jquery

  13. 13

    Closing the modal after i click on the button

  14. 14

    Closing the modal after i click on the button

  15. 15

    jQuery - product quantity not changing when I click plus button

  16. 16

    How to lanuch a post using javascript or jquery when I click a button?

  17. 17

    Update Progress GIF Image Can't be displayed when i click on a button in Modal pop Extender

  18. 18

    Pressing a button is supposed to start service and display text, but nothing happens when I click the button

  19. 19

    Display specific row data in bootstrap modal with edit button click

  20. 20

    How to display a difference modal popup According to click button

  21. 21

    how to pop display a modal upon click of a button nested in a loop

  22. 22

    When appending a font awesome icon in a button using jQuery the icon disappears when I click another button

  23. 23

    How To display text when we click button

  24. 24

    Script code will display when click button

  25. 25

    Modal Button Click Event

  26. 26

    When i click button ? Inserted value in edittext should be total and Calculate to display in another edittext with the help SELECT QUERY?

  27. 27

    Catch event click on button inside a modal created by jquery

  28. 28

    Map is getting appended to modal-body for each button click: jQuery

  29. 29

    ASP.net Button on click not firing using Jquery Modal Dialog

HotTag

Archive