javascript not working on dynamically added tabs

后端 未结 4 742
执笔经年
执笔经年 2021-01-26 06:01

I am facing a strange bug at the moment, involving javascript. I have used jquery ui tabs to dynamically add and remove tabs in my website, the content of the tab contains two b

4条回答
  •  臣服心动
    2021-01-26 06:35

    with reference to your fiddle...

    $("#butt").mouseenter(function () {
         $("#butt").css("visibility", "hidden");
     })
    

    it should be like this

    $jQuery.on("mouseenter","#butt",function () {
         $("#butt").css("visibility", "hidden");
     });
    

    Same goes for other elements which you know are going to be added at runtime.

提交回复
热议问题