📜 ⬆️ ⬇️

arcticModal - jQuery plugin for modal windows

To implement modal windows and dialogs, there are quite a few jQuery plugins. Having tried many of them, I couldn’t find one that was simple enough and, importantly, correctly solved the task.

Recently, SamDark wrote about the correct modal windows and introduced The Modal plugin to the community. I fully agree with his vision of modal windows, but in the presented plugin there was not enough functionality. I have long since been moving from project to project on the same topic, so I decided to also design them as a plug-in.

Main features




Using the plugin


We connect jQuery and jquery.arcticmodal plugin:
')
<script src="http://yandex.st/jquery/1.7.2/jquery.min.js"></script> <script src="js/arcticmodal/jquery.arcticmodal-0.1.min.js"></script> <link rel="stylesheet" href="js/arcticmodal/jquery.arcticmodal-0.1.css"> 

HTML markup:

 <div class="b-modal" id="exampleModal"> <div class="b-modal_close arcticmodal-close">X</div>    </div> 

Javascript:

 $('#exampleModal').arcticmodal(); 


Documentation, examples and download here.

Constructive criticism is very welcome :)

UPD Repository on GitHub

Source: https://habr.com/ru/post/149109/


All Articles