jQuery issues in Kentico 8

lawrence whittemore asked on May 12, 2014 11:19

Has anything changed in the way kentico 8 handles jquery? I have a site that has a form and the submit button does not work and the issue is with the version of jquery I am using.

Is adding our own jquery different in the version of kentico?

Recent Answers


Victor Hugo Garcia answered on May 12, 2014 11:29

Which jQuery version are you using?

I had the same issue, it only happens when you are logged In and trying to test in the same browser you are logged in, just give it a try in another browser, if it keeps doing the same behavior then, I suggest you to use the code I used to avoid conflict of jQuery version:

<!-- jQuery from CDN -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script>
    var $ = jQuery.noConflict();
</script>
<!-- ALL jQuery plugins goes here -->
<script src="http://cdn.jquerytools.org/1.2.7/all/jquery.tools.min.js"></script>

Use the code above on your master page or template you are invoking jQuery.

4 votesVote for this answer Mark as a Correct answer

Victor Hugo Garcia answered on May 12, 2014 11:30

Since, I cannot edit my previous post (Please Kentico team, add this feature to forums here).

Forgot to mention that I used that code before tag and it works pretty awesome.

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on May 12, 2014 12:08

I've never added anything for no conflict before but instead all my jQuery used jQuery tag instead of the $ has this changed for 8?

Weirdly enough just adding the no conflict variable seems to have fixed it.

0 votesVote for this answer Mark as a Correct answer

Jürgen Gutsch answered on June 12, 2014 09:28

After instlling the hotfix 8.0.8 I had to rearrange the fix for jQuery a little bit:

<!-- jQuery -->
<script>
  var $ = typeof jQuery === 'undefined' ? null : jQuery.noConflict();
</script>
<script src="/FCB/js/jquery.min.js"></script>
<script src="/FCB/js/jquery-migrate-1.2.1.min.js"></script>

With this change, I use jQuery.noConflict only if there is a jQuery allready included, for axample in an authenticated mode like edit mode or preview mode. On live mode Kentico never includes an own old jQuery version.

Hope it helps :)

0 votesVote for this answer Mark as a Correct answer

David Komárek answered on June 26, 2014 09:04

Please consider voting for the following idea, which should help avoiding jQuery conflicts in future releases: http://ideas.kentico.com/forums/239189-kentico-product-ideas/suggestions/6096405-kentico-should-use-its-own-alias-for-jquery

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.