Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Brandon Brigham
Brandon Brigham
3,716 Points

Need to make elements clickable

Please go to the site I'm working on :

http://thechasedesign.com/SantaClaraNARPM

You will see the four boxes: Members, Affiliates, Join!, News & Events below the hero image.

I'm trying to get the entire box clickable and not just the buttons for each box.

Thanks for your help!

1 Answer

Francois Dejardin
Francois Dejardin
1,778 Points

if u use jQuery :

Add an id to each div element, ie : id="memberId" and then on your footer (make sure you include jQuery)

<script>
$( "#memberId" ).click(function() {
  window.location='/members/';
});
</script>

or you can add :

onclick="window.location='/members/'

to your div :

<div class="service-box serv-1" onclick="window.location='/members/'"></div>

cheers ;)