• Nick
    March 10, 2015 at 1:47 pm #104227

    I suggest to check if the class “icon_selected” is already assigned. Thereby wrong highlighting of list and grid icon is prevented.

    if (!$(this).hasClass('icon_selected'))

    Full modified extract of wpresidence/js/control.js:

        ///////////////////////////////////////////////////////////////////////////////////////////
        /////// grid to list view
        ///////////////////////////////////////////////////////////////////////////////////////////
    
        $('#list_view').click(function(){
    		if (!$(this).hasClass('icon_selected')) {
    			$(this).toggleClass('icon_selected');
    			$('#listing_ajax_container').addClass('ajax12');
    			$('#grid_view').toggleClass('icon_selected');
    			
    			 
    			$('.listing_wrapper').hide().removeClass('col-md-4').removeClass('col-md-3').addClass('col-md-12').fadeIn(400) ;
    			$('.the_grid_view').fadeOut(10,function() {
    				$('.the_list_view').fadeIn(300);
    			});
    		}
         })
         
    	$('#grid_view').click(function(){
    		if (!$(this).hasClass('icon_selected')) {
    			var class_type;
    			class_type = $('.listing_wrapper:first-of-type').attr('data-org');
    			$(this).toggleClass('icon_selected');
    			$('#listing_ajax_container').removeClass('ajax12');
    			$('#list_view').toggleClass('icon_selected');
    			$('.listing_wrapper ').hide().removeClass('col-md-12').addClass('col-md-'+class_type).fadeIn(400); 
    			$('.the_list_view').fadeOut(10,function(){
    				$('.the_grid_view').fadeIn(300);
    			});
    		}
    	})
    Nick
    March 25, 2015 at 10:24 pm #105008

    What do you think?

You must be logged in to reply to this topic.

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.