• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

jquery hide all links where the url ends with certain text

how can I hide any link that ends in:
viewlsts.aspx?BaseType=1
0
jackjohnson44
Asked:
jackjohnson44
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
to hide : $("a[href$='viewlsts.aspx?BaseType=1']").hide();
to show : $("a[href$='viewlsts.aspx?BaseType=1']").show();

0
 
jackjohnson44Author Commented:
Thanks!
Is there any way to limit that to only something that appears as some child of a div called "s4-leftpanel-content"?  I am not sure how deep this would go down.
0
 
leakim971PluritechnicianCommented:
a div called? id? class? name?

here we go for id :
$("#s4-leftpanel-content>a[href$='viewlsts.aspx?BaseType=1']").hide();

if it don't work :
$("a[href$='viewlsts.aspx?BaseType=1']", "#s4-leftpanel-content").hide();

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now