simpModal is a simple modal jquery plugin based on leanModal by FinelySliced (See their website).
I built simpModal because I wanted flexibility. Many of the modal plugins I've seen out there rely on lots of HTML markup, which makes them too complex for simple things. Plus, I wanted to be able to code my CSS separately from the plugin, which certainly makes it a lot more designer-friendly. Finally, I wanted the plugin to add/destroy any necessary HTML tags it may need automatically, so that I wouldn't have unnecessary tags when a modal isn't visible.
- Simple
- Flexible width and height
- Independent CSS
- Ajax Support (with very useful options)
- Image Free
- Very light (less than 4Kb)
- Multiple instances on the same page
- Many options
- Very easy to use
- Events (yay!)
- No support for old IE browsers
- No iframe support
- No gallery support
It's super simple to open a new modal using simpModal. The following code would do!
$.simpModal({
content: "This is super cool!"
});
And there are many possible settings, which are simple to use as well. This would change the default animation, speed, and add an extra class to the modal:
$.simpModal({
content: "This is super cool!",
transition: "slideUp",
speed: 200
extraClass: "myModalClass"
});
Advanced settings using Ajax and callback functions are equally simple to implement using simpModal:
$.simpModal({
ajax: {
file: 'coolpage.php',
onSuccess: function() {
alert('Yay!');
}
}
});
See this page or download simpModal to see more examples and all possible settings.
On my website or on GitHub
My name is Arthur Câmara. I’m a web designer and developer from Belo Horizonte, Brazil. Check out my website or send me an email