I want hide and show custom message on radio button selection of shipping method on checkout page , but jQuery is not working in that section due to knockoutjs. Anyone have any idea for that how to implement custom jquery on shipping method selection?
here is my jquery code :
<script type="text/javascript">
require(["jquery"], function($) {
jQuery(document).ready(function(){
jQuery('.radio').click(function() {
alert("selected shipping");
});
});
});
</script>
1 Answer 1
<script type="text/javascript">
require(["jquery"], function($) {
$(document).ready(function(){
$(document).on("click", '.radio', function () {
alert("selected shipping");
});
});
});
</script>
Try this...!
answered Oct 31, 2018 at 10:56
Nauman m. Mansuri
4423 silver badges9 bronze badges
-
your most welcome...!Nauman m. Mansuri– Nauman m. Mansuri2018年10月31日 13:51:58 +00:00Commented Oct 31, 2018 at 13:51
default