jquery - string comparison in ie -


The following is my code, I want to hide a li tag based on its content.

   

My html

  & lt; Ul id = "overlay_opt" & gt; & Lt; Li class = "deactive" & gt; Any & lt; / Li & gt; & Lt; Li & gt; Request & lt; / Li & gt; & Lt; Li & gt; Impressions & lt; / Li & gt; & Lt; Li & gt; Clicks & lt; / Li & gt; & Lt; Li & gt; Revenue & lt; / Li & gt; & Lt; / Ul & gt;  

The problem is, that variable and string is happening in comparison.

i.e. "if (content == 'none')" every time it executes as wrong. / P>

  I did not use 'id' to use ID, using ID I'm hiding. & Lt; Ul id = "overlay_opt" & gt; & Lt; Li id = "none" & gt; Nobody & lt; / Li & gt; & Lt; Li class = "deactive" & gt; Request & lt; / Li & gt; & Lt; Li & gt; Impressions & lt; / Li & gt; & Lt; Li & gt; Clicks & lt; / Li & gt; & Lt; Li & gt; Revenue & lt; / Li & gt; & Lt; / Ul & gt; Dom.find ('ul # overlay_opt li') Click (function () (if ($ (this) .attr ('class')! = 'Deactive') {var content = $ (this) .text (); ($ (This) .attr ('id' ) == 'none') dom.find ('# secondary_para'). Hide (); and dom.find ('# secondary_para'). Html ($ (this) .text ()). Show ();}} );  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -