Dialog open and close problem
Hi all and Jack,
I simplified and minimized my previous question.
I have a button on my page like that:
- <a href="{{ URL::route('category/action', array($category->id)) }} "class="newWindow"><img src="{{ asset('img/green_button.png') }}" /></a>
And a dialog div:
- <div id="diyalog">There is a dialog here.
</div>
Finally an event:
- $(document).ready(function(){
$('.newWindow').click(function (event){
event.preventDefault();
$('#diyalog').dialog();
$("#diyalog").dialog("close");
});
});
When I clicked the button, there is the following error (I see it debug mod):
-
TypeError: $(...).dialog is not a function
$("#diyalog").dialog("close"); doesn't work at all.
How can I resolve that? Thanks.
Note: Upon reading some comments I tried some conflict commands, I renamed my jquery version etc.