You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

867 lines
26 KiB

9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
9 years ago
10 years ago
10 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
  1. /*!
  2. * # Semantic UI 2.0.0 - Modal
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. ;(function ( $, window, document, undefined ) {
  12. "use strict";
  13. $.fn.modal = function(parameters) {
  14. var
  15. $allModules = $(this),
  16. $window = $(window),
  17. $document = $(document),
  18. $body = $('body'),
  19. moduleSelector = $allModules.selector || '',
  20. time = new Date().getTime(),
  21. performance = [],
  22. query = arguments[0],
  23. methodInvoked = (typeof query == 'string'),
  24. queryArguments = [].slice.call(arguments, 1),
  25. requestAnimationFrame = window.requestAnimationFrame
  26. || window.mozRequestAnimationFrame
  27. || window.webkitRequestAnimationFrame
  28. || window.msRequestAnimationFrame
  29. || function(callback) { setTimeout(callback, 0); },
  30. returnedValue
  31. ;
  32. $allModules
  33. .each(function() {
  34. var
  35. settings = ( $.isPlainObject(parameters) )
  36. ? $.extend(true, {}, $.fn.modal.settings, parameters)
  37. : $.extend({}, $.fn.modal.settings),
  38. selector = settings.selector,
  39. className = settings.className,
  40. namespace = settings.namespace,
  41. error = settings.error,
  42. eventNamespace = '.' + namespace,
  43. moduleNamespace = 'module-' + namespace,
  44. $module = $(this),
  45. $context = $(settings.context),
  46. $close = $module.find(selector.close),
  47. $allModals,
  48. $otherModals,
  49. $focusedElement,
  50. $dimmable,
  51. $dimmer,
  52. element = this,
  53. instance = $module.data(moduleNamespace),
  54. elementNamespace,
  55. id,
  56. observer,
  57. module
  58. ;
  59. module = {
  60. initialize: function() {
  61. module.verbose('Initializing dimmer', $context);
  62. module.create.id();
  63. module.create.dimmer();
  64. module.refreshModals();
  65. module.verbose('Attaching close events', $close);
  66. module.bind.events();
  67. module.observeChanges();
  68. module.instantiate();
  69. },
  70. instantiate: function() {
  71. module.verbose('Storing instance of modal');
  72. instance = module;
  73. $module
  74. .data(moduleNamespace, instance)
  75. ;
  76. },
  77. create: {
  78. dimmer: function() {
  79. var
  80. defaultSettings = {
  81. debug : settings.debug,
  82. dimmerName : 'modals',
  83. duration : {
  84. show : settings.duration,
  85. hide : settings.duration
  86. }
  87. },
  88. dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)
  89. ;
  90. if($.fn.dimmer === undefined) {
  91. module.error(error.dimmer);
  92. return;
  93. }
  94. module.debug('Creating dimmer with settings', dimmerSettings);
  95. $dimmable = $context.dimmer(dimmerSettings);
  96. if(settings.detachable) {
  97. module.verbose('Modal is detachable, moving content into dimmer');
  98. $dimmable.dimmer('add content', $module);
  99. }
  100. else {
  101. module.set.undetached();
  102. }
  103. $dimmer = $dimmable.dimmer('get dimmer');
  104. },
  105. id: function() {
  106. id = (Math.random().toString(16) + '000000000').substr(2,8);
  107. elementNamespace = '.' + id;
  108. module.verbose('Creating unique id for element', id);
  109. }
  110. },
  111. destroy: function() {
  112. module.verbose('Destroying previous modal');
  113. $module
  114. .removeData(moduleNamespace)
  115. .off(eventNamespace)
  116. ;
  117. $window.off(elementNamespace);
  118. $close.off(eventNamespace);
  119. $context.dimmer('destroy');
  120. },
  121. observeChanges: function() {
  122. if('MutationObserver' in window) {
  123. observer = new MutationObserver(function(mutations) {
  124. module.debug('DOM tree modified, refreshing');
  125. module.refresh();
  126. });
  127. observer.observe(element, {
  128. childList : true,
  129. subtree : true
  130. });
  131. module.debug('Setting up mutation observer', observer);
  132. }
  133. },
  134. refresh: function() {
  135. module.remove.scrolling();
  136. module.cacheSizes();
  137. module.set.screenHeight();
  138. module.set.type();
  139. module.set.position();
  140. },
  141. refreshModals: function() {
  142. $otherModals = $module.siblings(selector.modal);
  143. $allModals = $otherModals.add($module);
  144. },
  145. attachEvents: function(selector, event) {
  146. var
  147. $toggle = $(selector)
  148. ;
  149. event = $.isFunction(module[event])
  150. ? module[event]
  151. : module.toggle
  152. ;
  153. if($toggle.length > 0) {
  154. module.debug('Attaching modal events to element', selector, event);
  155. $toggle
  156. .off(eventNamespace)
  157. .on('click' + eventNamespace, event)
  158. ;
  159. }
  160. else {
  161. module.error(error.notFound, selector);
  162. }
  163. },
  164. bind: {
  165. events: function() {
  166. $close.on('click' + eventNamespace, module.event.close);
  167. $window.on('resize' + elementNamespace, module.event.resize);
  168. }
  169. },
  170. get: {
  171. id: function() {
  172. return (Math.random().toString(16) + '000000000').substr(2,8);
  173. }
  174. },
  175. event: {
  176. close: function() {
  177. module.verbose('Closing element pressed');
  178. if( $(this).is(selector.approve) ) {
  179. if(settings.onApprove.call(element) !== false) {
  180. module.hide();
  181. }
  182. else {
  183. module.verbose('Approve callback returned false cancelling hide');
  184. }
  185. }
  186. else if( $(this).is(selector.deny) ) {
  187. if(settings.onDeny.call(element) !== false) {
  188. module.hide();
  189. }
  190. else {
  191. module.verbose('Deny callback returned false cancelling hide');
  192. }
  193. }
  194. else {
  195. module.hide();
  196. }
  197. },
  198. click: function(event) {
  199. if( $(event.target).closest($module).length === 0 ) {
  200. module.debug('Dimmer clicked, hiding all modals');
  201. if( module.is.active() ) {
  202. module.remove.clickaway();
  203. if(settings.allowMultiple) {
  204. module.hide();
  205. }
  206. else {
  207. module.hideAll();
  208. }
  209. }
  210. }
  211. },
  212. debounce: function(method, delay) {
  213. clearTimeout(module.timer);
  214. module.timer = setTimeout(method, delay);
  215. },
  216. keyboard: function(event) {
  217. var
  218. keyCode = event.which,
  219. escapeKey = 27
  220. ;
  221. if(keyCode == escapeKey) {
  222. if(settings.closable) {
  223. module.debug('Escape key pressed hiding modal');
  224. module.hide();
  225. }
  226. else {
  227. module.debug('Escape key pressed, but closable is set to false');
  228. }
  229. event.preventDefault();
  230. }
  231. },
  232. resize: function() {
  233. if( $dimmable.dimmer('is active') ) {
  234. requestAnimationFrame(module.refresh);
  235. }
  236. }
  237. },
  238. toggle: function() {
  239. if( module.is.active() || module.is.animating() ) {
  240. module.hide();
  241. }
  242. else {
  243. module.show();
  244. }
  245. },
  246. show: function(callback) {
  247. callback = $.isFunction(callback)
  248. ? callback
  249. : function(){}
  250. ;
  251. module.refreshModals();
  252. module.showModal(callback);
  253. },
  254. hide: function(callback) {
  255. callback = $.isFunction(callback)
  256. ? callback
  257. : function(){}
  258. ;
  259. module.refreshModals();
  260. module.hideModal(callback);
  261. },
  262. showModal: function(callback) {
  263. callback = $.isFunction(callback)
  264. ? callback
  265. : function(){}
  266. ;
  267. if( module.is.animating() || !module.is.active() ) {
  268. module.showDimmer();
  269. module.cacheSizes();
  270. module.set.position();
  271. module.set.screenHeight();
  272. module.set.type();
  273. module.set.clickaway();
  274. if( !settings.allowMultiple && $otherModals.filter('.' + className.active).length > 0) {
  275. module.debug('Other modals visible, queueing show animation');
  276. module.hideOthers(module.showModal);
  277. }
  278. else {
  279. settings.onShow.call(element);
  280. if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
  281. module.debug('Showing modal with css animations');
  282. $module
  283. .transition({
  284. debug : settings.debug,
  285. animation : settings.transition + ' in',
  286. queue : settings.queue,
  287. duration : settings.duration,
  288. useFailSafe : true,
  289. onComplete : function() {
  290. settings.onVisible.apply(element);
  291. module.add.keyboardShortcuts();
  292. module.save.focus();
  293. module.set.active();
  294. module.set.autofocus();
  295. callback();
  296. }
  297. })
  298. ;
  299. }
  300. else {
  301. module.debug('Showing modal with javascript');
  302. $module
  303. .fadeIn(settings.duration, settings.easing, function() {
  304. settings.onVisible.apply(element);
  305. module.add.keyboardShortcuts();
  306. module.save.focus();
  307. module.set.active();
  308. callback();
  309. })
  310. ;
  311. }
  312. }
  313. }
  314. else {
  315. module.debug('Modal is already visible');
  316. }
  317. },
  318. hideModal: function(callback, keepDimmed) {
  319. callback = $.isFunction(callback)
  320. ? callback
  321. : function(){}
  322. ;
  323. module.debug('Hiding modal');
  324. settings.onHide.call(element);
  325. if( module.is.animating() || module.is.active() ) {
  326. if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
  327. module.remove.active();
  328. $module
  329. .transition({
  330. debug : settings.debug,
  331. animation : settings.transition + ' out',
  332. queue : settings.queue,
  333. duration : settings.duration,
  334. useFailSafe : true,
  335. onStart : function() {
  336. if(!module.othersActive() && !keepDimmed) {
  337. module.hideDimmer();
  338. }
  339. module.remove.keyboardShortcuts();
  340. },
  341. onComplete : function() {
  342. settings.onHidden.call(element);
  343. module.restore.focus();
  344. callback();
  345. }
  346. })
  347. ;
  348. }
  349. else {
  350. module.remove.active();
  351. if( !module.othersActive() ) {
  352. module.hideDimmer();
  353. }
  354. module.remove.keyboardShortcuts();
  355. $module
  356. .fadeOut(settings.duration, settings.easing, function() {
  357. settings.onHidden.call(element);
  358. module.restore.focus();
  359. callback();
  360. })
  361. ;
  362. }
  363. }
  364. },
  365. showDimmer: function() {
  366. if($dimmable.dimmer('is animating') || !$dimmable.dimmer('is active') ) {
  367. module.debug('Showing dimmer');
  368. $dimmable.dimmer('show');
  369. }
  370. else {
  371. module.debug('Dimmer already visible');
  372. }
  373. },
  374. hideDimmer: function() {
  375. if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {
  376. $dimmable.dimmer('hide', function() {
  377. if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
  378. module.remove.clickaway();
  379. module.remove.screenHeight();
  380. }
  381. });
  382. }
  383. else {
  384. module.debug('Dimmer is not visible cannot hide');
  385. return;
  386. }
  387. },
  388. hideAll: function(callback) {
  389. var
  390. $visibleModals = $allModals.filter(':visible')
  391. ;
  392. callback = $.isFunction(callback)
  393. ? callback
  394. : function(){}
  395. ;
  396. if( $visibleModals.length > 0 ) {
  397. module.debug('Hiding all visible modals');
  398. module.hideDimmer();
  399. $visibleModals
  400. .modal('hide modal', callback)
  401. ;
  402. }
  403. },
  404. hideOthers: function(callback) {
  405. var
  406. $visibleModals = $otherModals.filter(':visible')
  407. ;
  408. callback = $.isFunction(callback)
  409. ? callback
  410. : function(){}
  411. ;
  412. if( $visibleModals.length > 0 ) {
  413. module.debug('Hiding other modals', $otherModals);
  414. $visibleModals
  415. .modal('hide modal', callback, true)
  416. ;
  417. }
  418. },
  419. othersActive: function() {
  420. return ($otherModals.filter('.' + className.active).length > 0);
  421. },
  422. add: {
  423. keyboardShortcuts: function() {
  424. module.verbose('Adding keyboard shortcuts');
  425. $document
  426. .on('keyup' + eventNamespace, module.event.keyboard)
  427. ;
  428. }
  429. },
  430. save: {
  431. focus: function() {
  432. $focusedElement = $(document.activeElement).blur();
  433. }
  434. },
  435. restore: {
  436. focus: function() {
  437. if($focusedElement && $focusedElement.length > 0) {
  438. $focusedElement.focus();
  439. }
  440. }
  441. },
  442. remove: {
  443. active: function() {
  444. $module.removeClass(className.active);
  445. },
  446. clickaway: function() {
  447. if(settings.closable) {
  448. $dimmer
  449. .off('click' + elementNamespace)
  450. ;
  451. }
  452. },
  453. screenHeight: function() {
  454. if(module.cache.height > module.cache.pageHeight) {
  455. module.debug('Removing page height');
  456. $body
  457. .css('height', '')
  458. ;
  459. }
  460. },
  461. keyboardShortcuts: function() {
  462. module.verbose('Removing keyboard shortcuts');
  463. $document
  464. .off('keyup' + eventNamespace)
  465. ;
  466. },
  467. scrolling: function() {
  468. $dimmable.removeClass(className.scrolling);
  469. $module.removeClass(className.scrolling);
  470. }
  471. },
  472. cacheSizes: function() {
  473. var
  474. modalHeight = $module.outerHeight()
  475. ;
  476. if(module.cache === undefined || modalHeight !== 0) {
  477. module.cache = {
  478. pageHeight : $(document).outerHeight(),
  479. height : modalHeight + settings.offset,
  480. contextHeight : (settings.context == 'body')
  481. ? $(window).height()
  482. : $dimmable.height()
  483. };
  484. }
  485. module.debug('Caching modal and container sizes', module.cache);
  486. },
  487. can: {
  488. fit: function() {
  489. return ( ( module.cache.height + (settings.padding * 2) ) < module.cache.contextHeight);
  490. }
  491. },
  492. is: {
  493. active: function() {
  494. return $module.hasClass(className.active);
  495. },
  496. animating: function() {
  497. return $module.transition('is supported')
  498. ? $module.transition('is animating')
  499. : $module.is(':visible')
  500. ;
  501. },
  502. scrolling: function() {
  503. return $dimmable.hasClass(className.scrolling);
  504. },
  505. modernBrowser: function() {
  506. // appName for IE11 reports 'Netscape' can no longer use
  507. return !(window.ActiveXObject || "ActiveXObject" in window);
  508. }
  509. },
  510. set: {
  511. autofocus: function() {
  512. if(settings.autofocus) {
  513. var
  514. $inputs = $module.find(':input:visible'),
  515. $autofocus = $inputs.filter('[autofocus]'),
  516. $input = ($autofocus.length > 0)
  517. ? $autofocus
  518. : $inputs
  519. ;
  520. $input.first().focus();
  521. }
  522. },
  523. clickaway: function() {
  524. if(settings.closable) {
  525. $dimmer
  526. .on('click' + elementNamespace, module.event.click)
  527. ;
  528. }
  529. },
  530. screenHeight: function() {
  531. if( module.can.fit() ) {
  532. $body.css('height', '');
  533. }
  534. else {
  535. module.debug('Modal is taller than page content, resizing page height');
  536. $body
  537. .css('height', module.cache.height + (settings.padding * 2) )
  538. ;
  539. }
  540. },
  541. active: function() {
  542. $module.addClass(className.active);
  543. },
  544. scrolling: function() {
  545. $dimmable.addClass(className.scrolling);
  546. $module.addClass(className.scrolling);
  547. },
  548. type: function() {
  549. if(module.can.fit()) {
  550. module.verbose('Modal fits on screen');
  551. if(!module.othersActive) {
  552. module.remove.scrolling();
  553. }
  554. }
  555. else {
  556. module.verbose('Modal cannot fit on screen setting to scrolling');
  557. module.set.scrolling();
  558. }
  559. },
  560. position: function() {
  561. module.verbose('Centering modal on page', module.cache);
  562. if(module.can.fit()) {
  563. $module
  564. .css({
  565. top: '',
  566. marginTop: -(module.cache.height / 2)
  567. })
  568. ;
  569. }
  570. else {
  571. $module
  572. .css({
  573. marginTop : '',
  574. top : $document.scrollTop()
  575. })
  576. ;
  577. }
  578. },
  579. undetached: function() {
  580. $dimmable.addClass(className.undetached);
  581. }
  582. },
  583. setting: function(name, value) {
  584. module.debug('Changing setting', name, value);
  585. if( $.isPlainObject(name) ) {
  586. $.extend(true, settings, name);
  587. }
  588. else if(value !== undefined) {
  589. settings[name] = value;
  590. }
  591. else {
  592. return settings[name];
  593. }
  594. },
  595. internal: function(name, value) {
  596. if( $.isPlainObject(name) ) {
  597. $.extend(true, module, name);
  598. }
  599. else if(value !== undefined) {
  600. module[name] = value;
  601. }
  602. else {
  603. return module[name];
  604. }
  605. },
  606. debug: function() {
  607. if(settings.debug) {
  608. if(settings.performance) {
  609. module.performance.log(arguments);
  610. }
  611. else {
  612. module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
  613. module.debug.apply(console, arguments);
  614. }
  615. }
  616. },
  617. verbose: function() {
  618. if(settings.verbose && settings.debug) {
  619. if(settings.performance) {
  620. module.performance.log(arguments);
  621. }
  622. else {
  623. module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
  624. module.verbose.apply(console, arguments);
  625. }
  626. }
  627. },
  628. error: function() {
  629. module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
  630. module.error.apply(console, arguments);
  631. },
  632. performance: {
  633. log: function(message) {
  634. var
  635. currentTime,
  636. executionTime,
  637. previousTime
  638. ;
  639. if(settings.performance) {
  640. currentTime = new Date().getTime();
  641. previousTime = time || currentTime;
  642. executionTime = currentTime - previousTime;
  643. time = currentTime;
  644. performance.push({
  645. 'Name' : message[0],
  646. 'Arguments' : [].slice.call(message, 1) || '',
  647. 'Element' : element,
  648. 'Execution Time' : executionTime
  649. });
  650. }
  651. clearTimeout(module.performance.timer);
  652. module.performance.timer = setTimeout(module.performance.display, 500);
  653. },
  654. display: function() {
  655. var
  656. title = settings.name + ':',
  657. totalTime = 0
  658. ;
  659. time = false;
  660. clearTimeout(module.performance.timer);
  661. $.each(performance, function(index, data) {
  662. totalTime += data['Execution Time'];
  663. });
  664. title += ' ' + totalTime + 'ms';
  665. if(moduleSelector) {
  666. title += ' \'' + moduleSelector + '\'';
  667. }
  668. if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
  669. console.groupCollapsed(title);
  670. if(console.table) {
  671. console.table(performance);
  672. }
  673. else {
  674. $.each(performance, function(index, data) {
  675. console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
  676. });
  677. }
  678. console.groupEnd();
  679. }
  680. performance = [];
  681. }
  682. },
  683. invoke: function(query, passedArguments, context) {
  684. var
  685. object = instance,
  686. maxDepth,
  687. found,
  688. response
  689. ;
  690. passedArguments = passedArguments || queryArguments;
  691. context = element || context;
  692. if(typeof query == 'string' && object !== undefined) {
  693. query = query.split(/[\. ]/);
  694. maxDepth = query.length - 1;
  695. $.each(query, function(depth, value) {
  696. var camelCaseValue = (depth != maxDepth)
  697. ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
  698. : query
  699. ;
  700. if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
  701. object = object[camelCaseValue];
  702. }
  703. else if( object[camelCaseValue] !== undefined ) {
  704. found = object[camelCaseValue];
  705. return false;
  706. }
  707. else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
  708. object = object[value];
  709. }
  710. else if( object[value] !== undefined ) {
  711. found = object[value];
  712. return false;
  713. }
  714. else {
  715. return false;
  716. }
  717. });
  718. }
  719. if ( $.isFunction( found ) ) {
  720. response = found.apply(context, passedArguments);
  721. }
  722. else if(found !== undefined) {
  723. response = found;
  724. }
  725. if($.isArray(returnedValue)) {
  726. returnedValue.push(response);
  727. }
  728. else if(returnedValue !== undefined) {
  729. returnedValue = [returnedValue, response];
  730. }
  731. else if(response !== undefined) {
  732. returnedValue = response;
  733. }
  734. return found;
  735. }
  736. };
  737. if(methodInvoked) {
  738. if(instance === undefined) {
  739. module.initialize();
  740. }
  741. module.invoke(query);
  742. }
  743. else {
  744. if(instance !== undefined) {
  745. instance.invoke('destroy');
  746. }
  747. module.initialize();
  748. }
  749. })
  750. ;
  751. return (returnedValue !== undefined)
  752. ? returnedValue
  753. : this
  754. ;
  755. };
  756. $.fn.modal.settings = {
  757. name : 'Modal',
  758. namespace : 'modal',
  759. debug : false,
  760. verbose : false,
  761. performance : true,
  762. allowMultiple : false,
  763. detachable : true,
  764. closable : true,
  765. autofocus : true,
  766. dimmerSettings : {
  767. closable : false,
  768. useCSS : true
  769. },
  770. context : 'body',
  771. queue : false,
  772. duration : 500,
  773. easing : 'easeOutExpo',
  774. offset : 0,
  775. transition : 'scale',
  776. padding : 50,
  777. onShow : function(){},
  778. onHide : function(){},
  779. onVisible : function(){},
  780. onHidden : function(){},
  781. onApprove : function(){ return true; },
  782. onDeny : function(){ return true; },
  783. selector : {
  784. close : '.close, .actions .button',
  785. approve : '.actions .positive, .actions .approve, .actions .ok',
  786. deny : '.actions .negative, .actions .deny, .actions .cancel',
  787. modal : '.ui.modal'
  788. },
  789. error : {
  790. dimmer : 'UI Dimmer, a required component is not included in this page',
  791. method : 'The method you called is not defined.',
  792. notFound : 'The element you specified could not be found'
  793. },
  794. className : {
  795. active : 'active',
  796. animating : 'animating',
  797. scrolling : 'scrolling',
  798. undetached : 'undetached'
  799. }
  800. };
  801. })( jQuery, window , document );