MCPcopy Create free account
hub / github.com/blockstrap/framework / init_callback

Function init_callback

blockstrap/js/blockstrap.js:892–929  ·  view source on GitHub ↗
(nav)

Source from the content-addressed store, hash-verified

890 {
891 // CALLBACK UPON COMPLETION
892 var init_callback = function(nav)
893 {
894 bs.core.modals();
895 bs.core.buttons();
896
897 // START OF BETTER CORE FORMS CLASS...?
898 $($.fn.blockstrap.element).on('submit', 'form.bs', function(e)
899 {
900 e.preventDefault();
901 var form = this;
902 var func = $(form).attr('data-function');
903 var vars = $(form).data();
904 if(typeof func != 'undefined' && typeof $.fn.blockstrap.forms[func] == 'function')
905 {
906 $.fn.blockstrap.forms[func](form, vars);
907 }
908 });
909
910 if($.isPlainObject(bs.styles))
911 {
912 bs.styles.set();
913 }
914
915 if(nav)
916 {
917 bs.core.nav(nav);
918 }
919
920 bs.core.loader('close');
921
922 bs.core.apply_actions('init_callback', function()
923 {
924 $(window).resize(function(e)
925 {
926 bs.core.resize();
927 })
928 });
929 }
930
931 // RESET IF REQUIRED
932 if($bs.vars('reset') === true)

Callers 1

blockstrap_coreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected