Created
January 25, 2017 11:00
-
-
Save martsie/f18a2fa307729cb7fc7b9b6814c7e030 to your computer and use it in GitHub Desktop.
Example of Drupal 7 ajax callback command in jQuery scope
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
/** | |
* Changes the page title. Can be called from Drupal AJAX commands using ajax_command_invoke(). | |
*/ | |
(function ($) { | |
$.fn.changePageTitle = function(pageTitle) { | |
document.title = pageTitle; | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment