Public functions from within a jQuery plugin

If you do something like the following: (function($){ $.fn.myPlugin = function(options) { // support multiple elements if (this.length > 1){ this.each(function() { $(this).myPlugin(options) }); return this; } // private variables var pOne=””; var pTwo = ”; // … // private methods var foo = function() { // do something … } // … // public … Read more

How to call .ajaxStart() on specific ajax calls

2018 NOTE: This answer is obsolete; feel free to propose an edit to this answer that will work. You can bind the ajaxStart and ajaxStop using custom namespace: $(document).bind(“ajaxStart.mine”, function() { $(‘#ajaxProgress’).show(); }); $(document).bind(“ajaxStop.mine”, function() { $(‘#ajaxProgress’).hide(); }); Then, in other parts of the site you’ll be temporarily unbinding them before your .json calls: $(document).unbind(“.mine”); … Read more

Preloading CSS Images

Preloading images using CSS only In the below code I am randomly choosing the body element, since it is one of the only elements guaranteed to exist on the page. For the “trick” to work, we shall use the content property which comfortably allows setting multiple URLs to be loaded, but as shown, the ::after … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)