Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How can I solve this query, jQuery won't execute, even with .noConflict();?

Asked by Nishimura Asato Aug 16, 2021 1.1K views 1 answer
Share

About this question

 I've googled this extensively and still can't debug the issue - I'm setting var $j = jQuery.noConflict();, I've verified that the js and css files are loading properly on the page. Can anyone see what I'm doing wrong here? I'm also using bootstrap but it's working fine and I assume that wouldn't cause a conflict. Following this example.

Includes:

<link href="{!URLFOR($Resource.jQueryUI, 'jquery-ui-1.11.4/jquery-ui.min.css')}" rel="stylesheet" />  

The script:

[removed] var $j = jQuery.noConflict(); j$(document).ready(function(){ j$("#ninjaLink").click(function() { alert("NINJA STAR TO FACE!!!!!"); }); }); [removed] NINJA ATTACK!

Just to verify the files are loading, this is right from the page (both jquery.js and jquery-ui.min.js are loaded, as well as the css): enter image description here


Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.