Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create jQuery modal dialog #7

Closed
bratislav opened this issue Sep 24, 2014 · 2 comments
Closed

Unable to create jQuery modal dialog #7

bratislav opened this issue Sep 24, 2014 · 2 comments

Comments

@bratislav
Copy link

Hi,

I'm trying to create a modal dialog to display when the admin page is ready using this code in the change_list.txt template :

<script type="text/javascript">

    (function($) {
        $(document).ready(function($) {
             $("#dialog").dialog({
                modal: true,
                autoOpen: true
            });
        });
    })(django.jQuery);
</script>

..but when I load the page I'm getting "Uncaught TypeError: undefined is not a function".

Dialog is defined in change_list.txt (which is overriden) inside block content like this :

<div id="dialog" title="Title">This is dialog.</div>

What should I do to set this dialog to show?

@barszczmm
Copy link
Owner

Hi,

I know that it took me a while to reply, but if you still have this problem could you post full source code of change_list template? It's hard to guess where is the problem if I don;t know what and where are you trying to put in the code.

@barszczmm
Copy link
Owner

I'm closing this as I can not help without more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants