Highlight items of specific taxonomy -


on test page have 2 columns of same taxonomy terms, make testing:

http://trt-test.fusionidea.com/team/

what i'm trying click on of terms on right side, , same term on left side become red , not of them now.

i apriciate kind of help.

the code have this:

<script> $(function() { $('.myclass <?php echo $tax_term->slug; ?>').click(function() { $('.leftcol <?php echo $tax_term->slug; ?>').addclass('tl-selected-red'); }); }); </script> 

left column:

<?php $taxonomy = 'meetourteam'; $tax_terms = get_terms($taxonomy, array('hide_empty' => false)); ?> <ul> <?php foreach ($tax_terms $tax_term) { echo '<li class="leftcol ' . $tax_term->slug . '">' . $tax_term->name.'</li>'; } ?> 

right column:

<?php $taxonomy = 'meetourteam'; $tax_terms = get_terms($taxonomy, array('hide_empty' => false)); ?> <ul> <?php foreach ($tax_terms $tax_term) { echo '<li class="myclass ' . $tax_term->slug . '">' . $tax_term->name.'</li>'; } ?> 


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -