0

I am using LocomotiveCMS for a project right now. There's an admin button that is generated and displayed for logged in users but I don't want it to be there. Unfortunately, the developers didn't associate any class or ID with the button and all the HTML is inline so I can't hide it. I was wondering if it would be possible to target and hide this element using javascript. Here is the HTML that is generated:

<a href="/products/_admin" onmouseout="this.style.backgroundPosition='0px 0px'" onmouseover="this.style.backgroundPosition='0px -45px'" onmousedown="this.style.backgroundPosition='0px -90px'" onmouseup="this.style.backgroundPosition='0px 0px'" style="display: block; z-index: 1031; position: fixed; top: 10px; right: 10px; width: 48px; height: 45px; text-indent: -9999px; text-decoration: none; background-image: url(http://localhost:8080/assets/locomotive/icons/start.png); background-color: transparent; background-position: 0px 0px; background-repeat: no-repeat no-repeat;">Admin</a>

Thank you!

416E64726577
  • 2,214
  • 2
  • 23
  • 47
user3101431
  • 407
  • 2
  • 8
  • 15
  • [**This**](http://stackoverflow.com/questions/3813294/how-to-get-element-by-innertext) might be what you're looking for – kei Jan 15 '14 at 18:18
  • I'm not advocating this, I'm just throwing it out there. There's always `!important`. – j08691 Jan 15 '14 at 18:21
  • @kei - I believe the issue is more of how to override the inline styling rather than being able to target the link. – j08691 Jan 15 '14 at 18:27

1 Answers1

2

With jQuery,

$("a[href='/products/_admin']").hide()
useSticks
  • 883
  • 7
  • 15