I'm a newbie in jQuery...
I've used one jQuery plugin (Actually SimpleModal Plugin) in my page. It didn't work until I replace $ with jQuery!
$(document).ready(function() { --> jQuery(document).ready(function() {
It is working now, but I still have a problem! I want to close this modal window by click on my cancel button on the page. In the manual of SimpleModal have been said: "you can programmatically close the currently opened dialog by calling $.modal.close();" but it doesn't work for me. I replaced the "$" with "jQuery" but doesn't work.
I want to know why I must use jQuery definition?! and what I must do in this situation?!
P.S. This code worked properly when clicking the button:
<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery('#cancelID').click(function() {
alert ("test");
});
});
</script>
This code doesn't proper action:
<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery('#cancelID').click(function() {
$.modal.close();
});
});
</script>
Thanks for your time and helping others.