Snippets - usefull code for web

Facebook Twitter
Code Snippets Change style: advanced code snippet search login / Register

Code Snippets

There’s a lot that you can do with an htaccess file, and of course, things can get pretty advanced in a hurry. Here, we’re going to keep things pretty simple. These are the 10 basic htaccess hacks that every webmaster should know. 1. Force Caching with htaccess 10 htaccess Hacks Every SEO Should Know |

10 htaccess Hacks Every SEO Should Know |

How to refresh the src of an image with jQuery? $(imageobj).attr('src', $(imageobj) .attr('src') + '?' + Math.random() ); How to see if an image is loaded or not with jquery var imgsrc = 'img/image1.png'; $('<img/>').load(function () { alert('image loaded'); }).error(function () { alert('error loading image'); }).attr('src', imgsrc); And if a set (example : 10 images) […] How to refresh the src of an image with jQuery? How to see if an image is loaded or not with jquery Some Useful JavaScript & jQuery Snippets Some Useful JavaScript & jQuery Snippets