Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SimpleModal-container positioning

Tags:

simplemodal

I am still a relative beginner with jquery so any help is gratefully appreciated.

I took the simplemodal function and changed the positioning from fixed to absolute as I wanted the modal box to be able to be scrolled with the background page. This is causing me a problem as somewhere (I presume in the jscript) the top position is being set so I can't override it in the external css.

Can anyone tell me how I can change the inline css for simplemodal-container?

Thanks!

like image 959
Loonytoons Avatar asked Feb 25 '23 01:02

Loonytoons


1 Answers

The following should work:

// replace #foo with your id or element
$('#foo').modal({onShow: function (d) {
    // replace '0px' with your value, or remove the property
    d.container.css({position: 'absolute', top: '0px'});
}});

Note: This does not work in IE6

like image 63
Eric Martin Avatar answered Apr 02 '23 02:04

Eric Martin