Skip to content

Force velocity to attach itself to the window object even if jQuery is installed #932

@Zephni

Description

@Zephni

Your system information

  • VelocityJS version: 2.0.6
  • Browser: Edge
  • Operating System: Windows

Checklist

  • Is this an issue with code?: Kind of
  • Is this an issue with documentation?: No
  • Have you reproduced this in other browsers?: Yes
  • Have you checked for updates?: Yes
  • Have you checked for similar open issues?: Yes

Please remember that this is an issue tracker, support requests should be posted on StackOverflow - see CONTRIBUTING.md

Please describe your issue in as much detail as possible:

I need to use the "non jQuery" version eg the standard JS function: Velocity() however if jQuery happens to be used on the same page velocity seems to prioritise the jQuery version and no longer attaches "Velocity" to the window object.

Is there something I can modify in the code manually to force velocity to attach it to the main object, or is there another way I can achieve this?

Finally, this may seem like a strange question because "why not just use the jquery version?", but in my use case I am including Velocity within a separate class, and my class does not require jQuery, so I am using the window Velocity function istead.. in other words I don't want my class to break just because jquery happens to be included on the page. If that makes sense.

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