Created
January 5, 2012 20:54
-
-
Save thirdender/1567235 to your computer and use it in GitHub Desktop.
Extend a Cargo CMS specific Javascript function
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
var openThisPrInline = (function() { | |
// Store the existing function | |
var oldFunction = window.openThisPrInline; | |
// Return a new function | |
return function(data) { | |
// Run the old code | |
oldFunction(data); | |
// Start jScrollPane if #section-scroll exists | |
if (document.getElementById("section-scroll")) { | |
jQuery('#section-scroll').jScrollPane(); | |
} | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment