Committer: vvasin
LJSUP-12990: Add "copy link" to image page. Provide functionality.U trunk/htdocs/js/jquery_fn.js
Modified: trunk/htdocs/js/jquery_fn.js =================================================================== --- trunk/htdocs/js/jquery_fn.js 2012-09-10 08:13:13 UTC (rev 22845) +++ trunk/htdocs/js/jquery_fn.js 2012-09-10 09:05:50 UTC (rev 22846) @@ -399,3 +399,17 @@ checkFinish(); }; }; + +/** + * Fix behavior of select box: trigger change event on keyup + */ +jQuery.fn.selectFix = function () { + 'use strict'; + + return this.filter('select').on('keyup', function (e) { + var code = e.which; + if (code >= 37 && code <= 40) { + jQuery(this).trigger('change'); + } + }); +};