javascript - Putting jQuery popup window in the center of page always? -
i got code allows nice pop window when clicked on particular image. brings out larger image gallery made. reason can't appear @ center of user's window, images different sizes, move depending on image shown.
the link at:
http://zeendesign.co.uk/cherrieimogen/cherrieimogen/cherrieimogen/portfolio.html
(the css called reveal.css)
any appreciated. thank you!
you assuming left on container must set 20% , that's script's doing.
try setting left based on (windowwidth-containerwidth)/2.
i.e.:
v = math.floor(($(window).width()-$("#mymodal").outerwidth())/2)+"px"; $("#mymodal").css("left",v);
Comments
Post a Comment