8000 jquery dependency for GraphPie.js · Issue #25 · wa0x6e/ResqueBoard · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content < 8000 script crossorigin="anonymous" type="application/javascript" src="https://github.githubassets.com/assets/keyboard-shortcuts-dialog-cf9f9950f389.js" defer="defer">
This repository was archived by the owner on Mar 23, 2023. It is now read-only.
This repository was archived by the owner on Mar 23, 2023. It is now read-only.
jquery dependency for GraphPie.js #25
Open
@mikeslim7

Description

@mikeslim7

I kept having a GraphPie related problem when i click on the Home button from another view. The problem was coming from:

GraphPie.js

...e=(b.parent().width()-2*d)/2...

and the error log in the console would be:
"...b.parent(...).width() is not a function..."

I think this is because the js is executed before jquery is loaded, especially if you are moving to the Home view from another view (It's not the first loading of the page).

I resolved the issue by modifying the header.ctp file to include jquery:

...
<link href="css/highlightjs/zenburn.css" rel="stylesheet" type="text/css">
        <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
        <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
    </head>
...

I think it would be better to implement this in future releases. So jquery is always available. Or find a way to ensure that angular.js will always load jquery before running a function that needs it.

Thanks!

Regards,
Mike.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0