Neil Thompson
asked on
using jQuery hide an entire <tr> and its contents if the contents contain "ProcessName=nr"
Hi
I'm trying to tidy a page of which the content output I have no control over (3rd party software) but using jQuery I would like to hide any entire table rows (<tr>) and their contents if the contents of the row or column contain ProcessName=nr
For example, the following split row has ProcessName=nrMissedBin so as it contains ProcessName=nr the entire row should all be hidden:
<tr align="left" style="background-color:Wh ite;font-s ize:1em;">
<td style="width:50%;"> < /td>
<td><a id="ctl00_MainContent_gvwP rocesses_c tl05_Hyper link1" title="Click for the Report a missed bin collection Service" href="MapCharactersPage.as px?service Path=2& ;ProcessName=nrMissedBin">Report a missed bin collection</a></td>
</tr>
Is this possible using jQuery please, and can someone supply the code to achieve this page wide as there could be many of them?
Thanks in advance
Neil
I'm trying to tidy a page of which the content output I have no control over (3rd party software) but using jQuery I would like to hide any entire table rows (<tr>) and their contents if the contents of the row or column contain ProcessName=nr
For example, the following split row has ProcessName=nrMissedBin so as it contains ProcessName=nr the entire row should all be hidden:
<tr align="left" style="background-color:Wh
<td style="width:50%;"> <
<td><a id="ctl00_MainContent_gvwP
</tr>
Is this possible using jQuery please, and can someone supply the code to achieve this page wide as there could be many of them?
Thanks in advance
Neil
ASKER
Wow, that's brilliant, thanks
How can I take it 1 step further and only use the above when this textarea has no content please? (as this is the only way how I know a user is logged in)
<textarea name="ctl00$txtAuthenticat edUser" rows="2" cols="20" readonly="readonly" id="ctl00_txtAuthenticated User" class="AuthenticatedUser" style="border-style:None;" >
How can I take it 1 step further and only use the above when this textarea has no content please? (as this is the only way how I know a user is logged in)
<textarea name="ctl00$txtAuthenticat
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Superb, thanks so much for the great, quick answer. Neil
The *= means contains. This code will look for an a href contains "ProcessName=nr" then hide the tr it is contained in.
http://jsbin.com/katuda/edit?html,output
Open in new window