Dear all,
I have the following jquery file name queryValidate.js
This is the function inside the file:
function YesNoDialogBox(button1, button2, element) {
var btns = {};
btns[button1] = function () {
alert("yes");
};
btns[button2] = function () {
alert("No");
$(this).dialog("close");
};
$("<div></div>").dialog({
autoOpen: true,
title: 'Confirmation Box',
modal: true,
buttons: btns
});
}
$('#btnSubmitchanges').click(function () {
YesNoDialogBox('Yes', 'No', $(this));
})
in the HTML code:
<script src="queryValidate.js" type="text/javascript"></script>
and for that I have added one click button:
<div class="buttonHolder">
<input name="Button3" id="btnSubmitchanges" type="button" value="Submit Changes" style="background-color:#A9E2F3; font-size: 12px; font-weight:bold;" />
</div>
Now, every time I click I got the error:
JavaScript runtime error: '$' is undefined
I saw that there is need to add reference to jquery library but I could not do that. How to fix the attached error?
BR//Hussain