user1760153
user1760153

Reputation: 291

Can I add a CSS class to a SimpleModal instance?

Is there a way to assign ContainerClass instead of ContainerCss in Simple Modal?

I am working on a website which should be responsive based on which device is being used, so for example for iPad I want the width and height of container smaller than larger screens. I have a CSS class based on @Media and would like to know if I could assign a class instead of CSS which creates style attribute in simple-modal container div.

Thanks.

Upvotes: 1

Views: 871

Answers (1)

isherwood
isherwood

Reputation: 61114

Some simple jQuery in a callback should do the trick:

http://www.ericmmartin.com/projects/simplemodal/

$("#myModal").modal( {
    onShow: function (dialog) {
        $(this).addClass('myClass');
    });
}});

Upvotes: 2

Related Questions