Active state disables link action.
Hi all, I have a function that sorts property listings, however when I add my active states through jQuery I loose the functionality (the page doesn't change or do anything). I assume I have to have a change var url function but Im not sure how to apply this to my code. I have included my php and jQuery below. I truly appreciate any help. Thanks in advance!
- <?php
- foreach( array('desc'=>$main_floor_master) as $asc_desc => $asc_desc_name ) {
- echo '<a class="filter-checkboxes" href="';
- echo add_query_arg( array( 'orderby' =>main_floor_master, 'order' => $asc_desc)
- );
- echo "\">Main Floor Master</a>";
- }
- ?>
- <?php
- foreach( array('desc'=>$status) as $asc_desc => $asc_desc_name ) {
- echo '<a class="filter-checkboxes" href="';
- echo add_query_arg( array( 'orderby' => status, 'order' => $asc_desc)
- );
- echo "\">Quick Move In</a>";
- }
- ?>
- <script>
- jQuery(document).ready(function($){
- //active state
- $('.filter-checkboxes').click(function(e) {
- e.preventDefault();
- $('.active').toggleClass('active');
- $(this).toggleClass('active');
- });
- });
- </script>