I have two links :
The first one is:
<a title="Kronos">First link</a>
the second one is:
<a title="Portal">Secondlink</a>
I want to hide the second one if the first one is loaded with javascript
How can i do it ?
I have two links :
The first one is:
<a title="Kronos">First link</a>
the second one is:
<a title="Portal">Secondlink</a>
I want to hide the second one if the first one is loaded with javascript
How can i do it ?
I assume that you're setting/hiding the visibility of the first link, and then changing the visibility of the second link based on that. If that's the case, and you're using JQuery, you can use code like this:
First, you need to give the links some way to be identified.
<a title="Kronos" id="link1">First link</a>
<a title="Portal" id="link2">Secondlink</a>
Next, you can use JS:
if ($('#link1').is(':visible')) {
$('#link2').hide();
}
For more info about what I used in the if statement, check out How do I check if an element is hidden in jQuery?