lexich / lexich/genericrelationview

noConflict jQuery

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Hi,

I was trying to use this nice little module in a Django CMS based project. This leads to the following error (Browser Console):

[Error] TypeError: $ is not a function. (In '$(self)', '$' is undefined)
    generic_view_json (generickey.js:4)
    onchange (10:264)

Django CMS uses noConflict jQuery, and from taking a glimpse at their JS code, it takes care of encapsulating the $ magic. (Otherwise regular jQuery is loaded first thing in the page, our custom JS code uses $, as well.)

Just wanted to inform on that.

Cheers!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting generickey.js, especially generic_view_json where the browser error reports that $ is undefined. Reproduce the issue in a Django CMS setup using jQuery noConflict; done should mean the module works without assuming $ is globally available.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.