Reputation: 18639
I have a couple small divs that I am trying to pop up when something happens, but they are not popping up, but instead appearing within the content of the page.
Would anyone know why that happens? Also, the jQuery is supposed to show a spinner gif to indicate you should wait, but it doesn't render that either.
Thanks in advance!
Upvotes: 0
Views: 151
Reputation: 4921
It looks as though your intention is to use the jQuery UI Dialog, and the path to the google hosted CDN for the jQuery UI is wrong, it is not loading the jQuery UI library, getting a script failed to load on https://ajax.googleapis.co/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js
I do believe it is a typo, missing the 'm' off com, so should be https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js
EDIT
if you want jQuery dialogs to initally be hidden, and then shown on a user action (like a button click) then initally construct the dialog with autoOpen set to false - as such
$("#loginpopup").dialog({ autoOpen: false} )
and then when required, they can be shown by
$("#loginpopup").dialog('open')
it appears that you are calling the standard jQuery .show method i.e.
$("#loginpopup").show()
and all this pretty much does is change the display: none to display: block, so if the element is not absolutely positioned (or somehow styled to display it where you want), then it will just appear where it normally would in the normal flow of the page
hope that helps?
Upvotes: 4
Reputation: 81
Throwing up the HTML would help, but I suspect you need to set
position:absolute
on your div tags.
I'd need to see what you are doing with the spinner gif to be of help there.
Upvotes: 1