JQuery dialog links

From KOP KB
Jump to: navigation, search

You can use this for multiple purposes for this but the main one would be to allow a customer to copy and paste a coupon code to be able then apply it at checkout.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
var cp1="CP1";
$(document).ready(function(){
    $("#hdrp").click(function(){
       window.prompt("Copy to clipboard: Ctrl+C, and Then hit enter, Then paste the code in to apply the coupon code", cp1);
    });
});
</script>