I have multiple buttons for things such as save, save as, new, etc. I wrote the function below so that we could easily call these windows without individually writing JS and HTML for each. Currently everything works except the title. The title displays as the first window opened, if i open Save then close, then open Delete the delete window content is displayed with the Save title. thanks for any help
JS
$(".kendo--modal").click(function(e) {
var div = $(this).attr("data-div"),
title = $(this).attr("data-title"),
content = $(this).attr("data-content"),
h = $(this).attr("data-h"),
w = $(this).attr("data-w");
createKendoModal(div, title, content, h, w )
});
HTML
<li>
<a class="kendo--modal"
data-title="Save View As"
data-div = "#window"
data-content = "/templates/html/modal--save.html"
data-h = "800"
data-w ="800"
>Save As
<span class="glyphicon glyphicon-floppy-open"></span>
</a>
</li>
<li>
<a class="kendo--modal"
data-title="Delete View"
data-div = "#window"
data-content = "/templates/html/modal--delete.html"
data-h = "800"
data-w ="800">Delete
<span class="glyphicon glyphicon-trash"></span>
</a>
</li>