Skip to content

Instantly share code, notes, and snippets.

View atomize's full-sized avatar
🎹
♩♩

Berti atomize

🎹
♩♩
View GitHub Profile
@atomize
atomize / reload_window_resize.js
Created March 1, 2012 07:10
jQuery reload window on resize
$(window).bind('resize',function(){
     window.location.href = window.location.href;
});
@atomize
atomize / jquery_preloadimages.js
Created March 1, 2012 07:08
jQuery preloadImages
jQuery.preloadImages = function() {
for (var i = 0; i < arguments.length; i++) {
jQuery("<img>").attr("src", arguments[i]);
}
}
@atomize
atomize / jQuery_form_hijack.html
Created March 1, 2012 07:00
jQuery form hijack anchor href (link) ajax
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript" src="http://malsup.github.com/jquery.form.js"></script>
<script>
$(document).ready(function(){
$('a').bind('click',function(event){
event.preventDefault();
$.get(this.href,{},function(response){