SimpleModal Container Positioning

I'm still a relative newbie with jquery, so any help is greatly appreciated.

I adopted a simplified function and changed the positioning from fixed to absolute, because I wanted the modal box to scroll from the background page. This causes me a problem somehow (I suppose in jscript) the top position is being set, so I cannot override it in external css.

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

Thank!

+3
source share
1 answer

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

+7
source

All Articles