Last active
June 14, 2016 19:51
-
-
Save postpostscript/3cb2479aa5fc819dac4b3b0af53528b3 to your computer and use it in GitHub Desktop.
ajax-load html attribute
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$('[ajax-load]').each(function() { | |
var $this = $(this); | |
$this.load($this.attr('ajax-load'), function() { | |
if ($this.attr('ajax-onloaded')) { | |
eval($this.attr('ajax-onloaded')); | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment