Support

Account

Home Forums Front-end Issues Refresh custom gallery image without page reload using jQuery prevent default Reply To: Refresh custom gallery image without page reload using jQuery prevent default

  • Hi @ddogdani

    I believe the preventDefault() function doesn’t work because the target is not correct. Could you please try this one instead:

    $( ".lslide a, .clone a" ).click(function( event ) {
      event.preventDefault();
    });

    The append part should be replaced with JS code that can replace the main image with the right one. If you use AJAX to get the image, then you need to execute the function here. If you use a slider plugin, please ask the plugin author about it.

    I hope this helps 🙂