Simple modal div in jQuery?

2019-01-16 13:35发布

I have tried almost all of the jQuery Modal plugins I can find on the net but they are all much to bulky for what I need. I don't need all the fancy features, I want to be able to open a div and have the background of the page go transparent grey like the photo below and have my div be on top of it, that is all I need to do so I would like to write some jQuery to do this instead of using a bulky plugin. Does anyone have any small code that can do this task? Is the transparent background an image or just CSS?

8条回答
别忘想泡老子
2楼-- · 2019-01-16 14:01

SimpleModal does precisely what you want to do.

查看更多
可以哭但决不认输i
3楼-- · 2019-01-16 14:03

I would NOT recommend jQuery UI - it's huge and overcomplex for that simple task. Here are some other plugins:

查看更多
登录 后发表回答