aniketpant / immoral

A spunky clean flexible no-forced-design modal library.

Home Page:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove forced HTML elements

aniketpant opened this issue · comments

Provide more control to the user to change the modal generation.

Current list of options.

$.immoral.options = {
  content: '',
  modalShadowDiv: '<div id="modal_shadow" style="display:none;"></div>',
  modalWrapper: '<div class="modal-wrapper" />',
  modalCloseButton: '<a href="#" rel="modal:close">Close</a>',
  modalShadow: false,
  modalStyle: {
    width: '50%',
    height: '50%',
    margin: '0 auto'

Out of these, we are forcing the user to use a structure defined by us.
#modal_shadow is being used for the shadow overlay. We can allow the user to change it. .modal-wrapper and .modal--content also being forced.

The following need to be abstracted:

  • #modal_shadow to modalShadowClass
  • .modal-wrapper to modalWrapperClass
  • .modal--content to modalWrapperContentClass

Yes, so these are specifics to, as a library we can abstract them out.

ok will need to go thru this. mind begins to melt