<a class="glyphicon glyphicon-chevron-down" id="row"></a>
$("-sharprow").click(function(){
$(this).toggleClass("glyphicon glyphicon-chevron-up");
})
Why can"t I change the direction of the arrow?
<a class="glyphicon glyphicon-chevron-down" id="row"></a>
$("-sharprow").click(function(){
$(this).toggleClass("glyphicon glyphicon-chevron-up");
})
Why can"t I change the direction of the arrow?
toggleClass is to remove the calss attribute if there is a class attribute in the selected page element, and to add the class attribute if there is no class attribute.
<a class="glyphicon glyphicon-chevron-down" id="row"></a>
$("-sharprow").click(function(){
$(this).toggleClass('glyphicon glyphicon-chevron-up');
})
when clicked once, the code removes' glyphicon' and adds' glyphicon-chevron-up'
code to
<a class="glyphicon-chevron-down glyphicon-chevron-up" id="row"></a>
so the icon cannot be displayed
if you want to switch, you can change it to
.$("-sharprow").click(function(){
$(this).toggleClass('glyphicon-chevron-down glyphicon-chevron-up');
})
problem description individual year range selections, month range selections, and date range selections are required in a project. Since I used bootstrap s daterangepicker plug-in before, I now want to use this plug-in as well. But this plug-in I act...