| 1 |
(function($){ |
| 2 |
|
| 3 |
// Remove css when oceanwp theme is enabled. |
| 4 |
var remove_oceanwp_custom_style = function(){ |
| 5 |
if( 'OceanWP' == cartflows.current_theme ){ |
| 6 |
var style = document.getElementById("oceanwp-style-css"); |
| 7 |
style.remove(); |
| 8 |
} |
| 9 |
} |
| 10 |
|
| 11 |
$(document).ready(function($) { |
| 12 |
|
| 13 |
remove_oceanwp_custom_style(); |
| 14 |
|
| 15 |
$(document).on( 'click', 'a[href*="wcf-next-step"]', function(e) { |
| 16 |
|
| 17 |
e.preventDefault(); |
| 18 |
|
| 19 |
if( 'undefined' !== typeof cartflows.is_pb_preview && '1' == cartflows.is_pb_preview ) { |
| 20 |
e.stopPropagation(); |
| 21 |
return; |
| 22 |
} |
| 23 |
|
| 24 |
window.location.href = cartflows.next_step; |
| 25 |
|
| 26 |
return false; |
| 27 |
}); |
| 28 |
}); |
| 29 |
})(jQuery); |