jquery - Disable Text Selection in IE -
i trying disable text selection, , works fine in browsers ie. have added bit of code css index. still not disabling.
i have added index:
$('#poet').disableselection(); // deprecated in jquery ui 1.9 $(el).attr('unselectable','on') .css({'-moz-user-select':'-moz-none', '-moz-user-select':'none', '-o-user-select':'none', '-khtml-user-select':'none', /* put in class */ '-webkit-user-select':'none',/* , add css class here instead */ '-ms-user-select':'none', 'user-select':'none' }).bind('selectstart', function(){ return false; }); $("#123").bind( "selectstart", function(e){ e.preventdefault(); return false; }); $("#123").bind("selectstart", function (evt) { evt.preventdefault(); }); and .css file:
* { -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -ms-user-select:none; } any appreciated. thank you.
add both of these existing css class
-webkit-touch-callout: none; user-select: none; additionally, can check link more details.
http://msdn.microsoft.com/en-us/library/ie/jj152140(v=vs.85).aspx
prevent text selection when dragging outside target in ie7/8
given post specifies "jquery" :
$("#inputid").focus(function() { $(this).blur(); }):
Comments
Post a Comment