@yzhura/smodals
v1.0.9
Published
Simple modals
Downloads
1
Readme
��#� �s�m�o�d�a�l�s�-�p�l�u�g�i�n�
�
�
�
�S�M�o�d�a�l�s�-�p�l�u�g�i�n� �r�e�n�d�e�r� �m�o�d�a�l�s� �i�n�t�o� �y�o�u�r� �H�T�M�L� �c�o�d�e�.�
�
�
�
�#�#� �I�n�s�t�a�l�l�a�t�i�o�n�
�
�
�
�R�u�n�:�
�
�
�
��
��s�h�
�
�n�p�m� �i� �s�m�o�d�a�l�s�
�
�
��
�
�
�
�
�o�r� �l�i�n�k� �C�D�N� �i�n�t�o� �y�o�u�r� �H�T�M�L� �c�o�d�e�:�
�
�
�
��
��s�h�
�
�<�s�c�r�i�p�t� �s�r�c�=�"�h�t�t�p�s�:�/�/�c�d�n�.�j�s�d�e�l�i�v�r�.�n�e�t�/�n�p�m�/�s�m�o�d�a�l�s�@�1�.�0�.�7�/�d�i�s�t�/�i�n�d�e�x�.�j�s�"� �d�e�f�e�r�>�<�/�s�c�r�i�p�t�>�
�
�
��
�
�
�
�
�#�#� �H�o� �t�o� �u�s�e�:�
�
�
�
���I�f� �y�o�u� �w�a�n�n�a� �t�o� �c�r�e�a�t�e� �c�l�i�c�k�a�b�l�e� �H�T�M�L� �c�a�r�d� �m�a�k�e� �s�o�m�e�t�h�i�n�g� �s�i�m�i�l�a�r�:���
�
�
�
��
��s�h�
�
�<�d�i�v� �c�l�a�s�s�=�"�s�o�m�e�-�c�a�r�d�"� �d�a�t�a�-�m�o�d�a�l�-�t�i�t�l�e�=�"�M�o�d�a�l� �h�e�a�d�e�r�"�>�
�
� � � � �<�d�i�v� �c�l�a�s�s�=�"�i�m�g�-�w�r�a�p�"�>�
�
� � � � � � � � �<�i�m�g� �d�a�t�a�-�m�o�d�a�l�-�i�m�g� �s�r�c�=�"�h�t�t�p�s�:�/�/�p�i�c�s�u�m�.�p�h�o�t�o�s�/�2�0�0�"� �a�l�t�=�"�a�l�t�"�>�
�
� � � � �<�/�d�i�v�>�
�
� � � � �<�p� �d�a�t�a�-�m�o�d�a�l�-�t�e�x�t�>�H�i� �t�h�e�r�e�!� �C�l�i�c�k� �o�n� �"�M�o�r�e� �d�e�t�a�i�l�s�"� �b�u�t�t�o�n� �t�o� �o�p�e�n� �m�o�d�a�l�<�/�p�>�
�
� � � � �<�b�u�t�t�o�n� �c�l�a�s�s�=�"�o�p�e�n�-�m�o�d�a�l�-�b�t�n�"�>�M�o�r�e� �d�e�t�a�i�l�s�<�/�b�u�t�t�o�n�>�
�
�<�/�d�i�v�>�
�
�
��
�
�
�-� �F�o�r� �c�l�a�s�s�e�s� �I� �h�a�v�e� �s�t�y�l�e�s� �a�l�r�e�a�d�y� �(�b�u�t� �y�o�u� �c�a�n� �o�v�e�r�w�r�i�t�e� �t�h�e�m�)�
�
�-� ��c�l�a�s�s�=�"�s�o�m�e�-�c�a�r�d�"�
� �-�-�-�>� �t�h�i�s� �c�l�a�s�s� �w�i�l�l� �b�e� �b�i�n�d� �i�n� �j�s� �f�i�l�e�.�.�.�
�
�-� ��d�a�t�a�-�m�o�d�a�l�-�t�i�t�l�e�
� �-�-�-�>� �n�e�e�d� �t�o� �i�n�s�e�r�t� �t�i�t�l�e� �i�n�t�o� �m�o�d�a�l�
�
�-� ��d�a�t�a�-�m�o�d�a�l�-�i�m�g�
� �-�-�-�>� �n�e�e�d� �t�o� �i�n�s�e�r�t� �i�m�a�g�e� �i�n�t�o� �m�o�d�a�l�
�
�-� ��d�a�t�a�-�m�o�d�a�l�-�t�e�x�t�
� �-�-�-�>� �n�e�e�d� �t�o� �i�n�s�e�r�t� �t�e�x�t� �i�n�t�o� �m�o�d�a�l�
�
�-� ��c�l�a�s�s�=�"�o�p�e�n�-�m�o�d�a�l�-�b�t�n�"�
� �-�-�-�>� �s�t�a�t�i�c� �c�l�a�s�s� �t�o� �o�p�e�n� �m�o�d�a�l� �(�i�f� �t�h�i�s� �b�u�t�t�o�n� �n�o�t� �e�x�i�s�t� �c�l�i�c�k� �w�i�l�l� �w�o�r�k� �o�n� �p�a�r�e�n�t� �c�o�m�p�o�n�e�n�t�,� �i�n� �o�u�r� �c�a�s�e� �t�h�i�s� �i�s� �"�s�o�m�e�-�c�a�r�d�"�)�
�
�
�
�a�n�d� �i�n� �y�o�u�r� �j�s� �f�i�l�e�:�
�
�
�
��
��s�h�
�
�n�e�w� �S�M�o�d�a�l�s�(�'�.�s�o�m�e�-�c�a�r�d�'�)�;�
�
�
��
�
�
�
�
�-� �'�.�s�o�m�e�-�c�a�r�d�'� �-�-�-�>� �.�.�.�c�o�m�m�i�n�g� �f�r�o�m� �y�o�u� �H�T�M�L�
�
�
�
���O�r� �y�o�u� �c�a�n� �o�p�e�n� �y�o�u�r� �c�u�s�t�o�m� �c�o�n�t�e�n�t�.���
�
�C�r�e�a�t�e� �y�o�u�r� �H�T�M�L�:�
�
�
�
��
��s�h�
�
�<�d�i�v� �d�a�t�a�-�m�o�d�a�l�-�i�d�=�"�m�o�d�a�l�-�1�"� �c�l�a�s�s�=�"�c�u�s�t�o�m�-�m�o�d�a�l�"�>�
�
� � � � �<�d�i�v�>�
�
� � � � � � � � �M�o�d�a�l� �f�r�o�m� �H�T�M�L�
�
� � � � � � � � �<�b�u�t�t�o�n� �c�l�a�s�s�=�"�m�o�d�a�l�-�b�u�t�t�o�n�-�c�l�o�s�e�"�>�C�l�o�s�e�<�/�b�u�t�t�o�n�>�
�
� � � � �<�/�d�i�v�>�
�
�<�/�d�i�v�>�
�
�
��
�
�
�-� ��c�l�a�s�s�=�"�m�o�d�a�l�-�b�u�t�t�o�n�-�c�l�o�s�e�"�
� �i�s� �a� �s�t�a�t�i�c� �c�l�a�s�s�.� �D�o�n�'�t� �c�h�a�n�g�e� �i�t�.�
�
�
�
�a�f�t�e�r� �t�h�a�t� �c�r�e�a�t�e� �b�u�t�t�o�n� �a�n�d� �b�i�n�d� �i�t� �f�r�o�m� �d�a�t�a�-�a�t�t�r�i�b�u�t�e�:�
�
�
�
��
��s�h�
�
�<�b�u�t�t�o�n� �d�a�t�a�-�m�o�d�a�l�-�i�d�=�"�m�o�d�a�l�-�1�"�>�O�p�e�n� �M�o�d�a�l�<�/�b�u�t�t�o�n�>�
�
�
��
�
�
�
�
�-� ��d�a�t�a�-�m�o�d�a�l�-�i�d�
� �m�u�s�t� �b�e� �i�n�d�e�n�t�i�c�a�l� �
�
�
�
�#�#� �F�o�r� �m�o�r�e� �e�x�a�m�p�l�e�s�
�
�
�
�c�l�o�n�e� �t�h�i�s� �p�r�o�j�e�c�t� �a�n�d� �r�u�n�:�
�
�
�
��
��s�h�
�
�n�p�m� �i�
�
�n�p�m� �r�u�n� �s�t�a�r�t�
�
�
��
�
�
�
�
�t�h�e�n� �o�p�e�n� �e�x�a�m�p�l�e�.�h�t�m�l�