I am trying to find a way round a third party page builder that strips code out of the text areas of their "information boxes" in order to add some links to the team pages. It seems you can add ul's but not add any class information to them. I'm trying to get around this by using jquery to add click events to the li elements, the code I have is:
jQuery(function($) {
jQuery('.contact-det ul li:nth-child(1)').click(function() {
location.href = '/click-one';
});
jQuery('.contact-det ul li:nth-child(2)').click(function() {
location.href = '/click-two';
});
});
and the html
<div class="wpb_wrapper ">
<div class="contact-det" style="background-color: #4389a2;">
<p>1. <b>drop a line</b></p>
<h6>Contact Information</h6>
</div>
<div class="contact-det" style="background-color: #544c93;">
<p>2. <b>find us</b></p>
<h6>Address</h6>
</div>
<div class="contact-det" style="background-color: #5c258d;">
<p>3. <b>office hours</b></p>
<h6>Monday–Friday<br>
9am–5pm</h6>
</div>
<div class="contact-det" style="background-color: #4d6799;">
<p>4. <b>meet us</b></p>
<h6><p></p>
<ul>
<li>Click One</li>
<li>Click Two</li>
</ul>
<p></p></h6>
</div>
</div>
Am I using the nth-child wrongly? Going wrong somewhere else?