Created
October 17, 2011 01:35
-
-
Save rwbaker/1291724 to your computer and use it in GitHub Desktop.
JavaScript: jQuery Plugin Bootstrap
This file contains 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
$(document).ready(function() { | |
app.loadPlugins() | |
//Initialize for all pages | |
app.init.main() | |
}) | |
var app = { | |
init: { | |
main: function () { | |
//Cache the DOM | |
jQuery.root = jQuery(document) | |
//This is how you use it: | |
//jQuery.root.find('div.special-selector').doSomething() | |
//Prevent blank links from having any effect | |
$('a[href="#"]').click(function () { return false; }) | |
} | |
}, | |
loadPlugins: function () { | |
/* Plugins */ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment