JQuery mutiple Button on click show different on output

59 views Asked by At
<div class="btn-toolbar">
<button type="button1" class="btn btn-primary btn mr-3" >Add Recyclable</button>
<button id="edit" type="button2" class="btn btn-secondary btn mr-3" disabled>Edit Recyclable</button>
<button type="button3" class="btn btn-primary custom btn mr-3">Add Type</button>
<button id="delete" type="button4" class="btn btn-danger custom"  disabled>Delete</button>
<div id="windowForAssign"></div>
<script>
$('button').click(createAndShowPopup);
var kendoWindowAssign = $("#windowForAssign");
var title = "Test";
var url = ""
function createAndShowPopup(){                              
kendoWindowAssign.kendoWindow({
width: "650px",
modal: true,
height: '500px',
iframe: true,
resizable: false,
title: title,
content: "test.html",
visible: false,
});
   
var popup = $("#windowForAssign").data('kendoWindow');
popup.open();
popup.center();
}
</script>

however as mention the button is classified as all button how can i indicate that each button it do different pop up like title and content ? Example of pop up with different clicks example of how it look like

if i change to $("button2").click ... it wouldnt work as i wan to seperate them how can i do ?

0

There are 0 answers