-4

I want to do temporary disable a html element from a html page:

<i class="fa fa-eye fa-2"></i> <span class="feat-info-text"></span>

Actually, i want to remove the mentioned all lines from a html page source through javascript/jquery code by place in <head></head> tag.

Baki
  • 1
  • 1
  • 4

1 Answers1

0

You can do the following and find the elements with the class attributes like so, but it is you may want to give your elements IDs so you can refer to them​more easily.

HTML

<i class="fa fa-eye fa-2"></i>
<span class="feat-info-text"></span>

jQuery

$(document).ready(function(){
    $(".fa.fa-eye.fa-2, .feat-info-text").remove();
});

Note

You may want to hide the elements instead of removing them from the DOM. I am not sure what your context is, but it is something you may want to consider.