javascript - Class disabled not working <li> tag - Stack Overflow

i write a class disabled in li tag show disabled style but click the menu is run<li class=" dis

i write a class disabled in li tag show disabled style but click the menu is run

<li class=" disabled"> <a class="ajax-link" href="#"><i class="glyphicon glyphicon-align-justify"></i><span> List Services</span></a></li>

why the menu inactive in class disable any way to disable the menu in this condition ,please help me, thanks in advance

i write a class disabled in li tag show disabled style but click the menu is run

<li class=" disabled"> <a class="ajax-link" href="#"><i class="glyphicon glyphicon-align-justify"></i><span> List Services</span></a></li>

why the menu inactive in class disable any way to disable the menu in this condition ,please help me, thanks in advance

Share Improve this question edited Oct 9, 2017 at 5:21 Andrew asked Oct 9, 2017 at 5:12 AndrewAndrew 8663 gold badges19 silver badges44 bronze badges 3
  • Setting an arbitrary class name to an element doesn't make it unclickable, please show the relevant CSS. And please, clean up the PHP mess from the example, this is a client-side problem. – Teemu Commented Oct 9, 2017 at 5:16
  • 1 Refer stackoverflow./questions/15643505/… – Jaydeep Rajput Commented Oct 9, 2017 at 5:20
  • @jayadeeprajput tkz it's working – Andrew Commented Oct 9, 2017 at 5:22
Add a ment  | 

2 Answers 2

Reset to default 3

CSS:

.disabled {
    pointer-events:none; //This makes it not clickable
    opacity:0.6;         //This grays it out to look disabled
}

add this to solve that issue !!!

The element is never the target of mouse events; however, mouse events may target its descendant elements if those descendants have pointer-events set to some other value.

Use this code:

.disabled a {
   pointer-events:none; 
   opacity:0.6;
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745137751a4613283.html

相关推荐

  • javascript - Class disabled not working &lt;li&gt; tag - Stack Overflow

    i write a class disabled in li tag show disabled style but click the menu is run<li class=" dis

    7小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信