html - How to be able copy text header on active tab -
i want copy header of active tab, can't highlight text on active tab. tried this, can't make work.
<ul class="nav nav-tabs"> <li class="active"><a href="#" class="enableselect">home</a></li> <li><a href="#">profile</a></li> <li><a href="#">messages</a></li> </ul> .enableselect { -moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; }
maybe not supported mozilla's website says
this feature non-standard , not on standards track. not use on production sites facing web: not work every user. there may large incompatibilities between implementations , behavior may change in future.
use jquery toggle active links
$(function() { $("li").click(function() { // remove classes $("li").removeclass("enableselect"); // add class 1 clicked $(this).addclass("enableselect"); }); });
or can use text of click element
$(function() { $("li").click(function() { var text = $(this).text() }); });
Comments
Post a Comment