Valerii Vasin (valerii) wrote in changelog,
Valerii Vasin
valerii
changelog

[livejournal] r22846: LJSUP-12990: Add "copy link" to image pa...

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');
+		}
+	});
+};

Tags: invis89, js, livejournal, vvasin
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments