handy css classes with js function

  • clickLoadAjaxModal
  • clickLoadPage
  • [data-poload]
  • ajaxLoad
  • showLoading
  • hideLoading
  • submitForm
  • cmdPrint
  • CheckAll
  • ajaxSubmit
  • showLoading [Type: function]: this function can be called anytime before calling ajax stuffs, it will simply show loading icon in screen
  • hideLoading [type: function]:
    This function can be used to close loading icon in screen once ajax process is completed
  • cmdPrint [type: css class]:
    this class can be assigned to any a tag or btn, and it will trigger print dialog box
  • ajaxLoad [type: class]
    this class can be assigned to any div and it will load page content specified on data-url attribute on page load. to reload the page content again, we can trigger refresh event also
  • clickLoadPage [type: class]
    this class can be assigned to any div or btn, it will load content of page that has been specified in data-url attribute or href attribute to div refered on data-target attribute
  • clickLoadAjaxModal [type: class]
    this class can be used to any btn, it will load content of page that has been specified in data-url attribute and load to modal body and show modal dialog box
  • submitForm [type: class]
    this class can be used to any btn, it will find the target form mentioned in data-target attribute and submit it after validation
  • ajaxSubmit [type: class]
    this class can be used to any form, it will then enable ajax submission of form instead of regular submit.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.