• Hi, its really good script that is solving alot of problems; the other thing is; i have select menu at right side bar; which uses;

       <script type="text/javascript">
    
            $(document).ready(function(){
                
             	    $('.subject-list').on('change', function() {
    
    		    $('.subject-list').not(this).prop('checked', false);  
    
    		});  
                    
                 $('.submit-form').on('click',function(){
                
                var isChecked = $('input[type="checkbox"]').is(":checked");
                 
                if (isChecked) {
                   
                   $('input[type="checkbox"]:checked').each(function() {
                   var checkVal = this.value;
                   window.location = checkVal;     
                   });
                    
                } else {
                    alert("Please select checkbox.");
                }
              
             });
               
    
            });
    
        </script>

    code; the problem is when ajax search is active;
    the selected brand goes to; https://www.delkomexport.com/urunler/rock-makina-modelleri/product

    instead of https://www.delkomexport.com/urunler/rock-makina-modelleri/epiroc-yerustu-rock-makina-modelleri/

    there is some conflict which i couldnt solve can you help? thanks

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    I think the problem is, that the code you have there, checks if any checkbox is checked, not only the ones from the subject list. I suggest this correction:

    <script type="text/javascript">
    $(document).ready(function(){
      $('.subject-list').on('change', function() {
        $('.subject-list').not(this).prop('checked', false);  
      });  
                
      $('.submit-form').on('click',function(){
        var isChecked = $('input.subject-list[type="checkbox"]').is(":checked");
        if (isChecked) {
           $('input.subject-list[type="checkbox"]:checked').each(function() {
             var checkVal = this.value;
             window.location = checkVal;     
           });
        } else {
           alert("Please select checkbox.");
        }
      });
    });
    </script>

    Best,
    Ernest M.

Viewing 1 replies (of 1 total)
  • The topic ‘Conflict with some script’ is closed to new replies.