This is a migrated thread and some comments may be shown as answers.

Kendo UI Modernizr and jQuery

3 Answers 338 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Jacques
Top achievements
Rank 2
Jacques asked on 14 Oct 2013, 11:46 AM
When you have the following scripts included in your page: 
kendo.modernizr.custom.js
kendo/2013.2.716/jquery.js
kendo/2013.2.716/kendo.all.js

Is it necessary to include your own Modernizr and JQuery libraries? I.e. are these full versions of the frameworks/files? 

Follow Up:
kendo.modernizr.custom.js doesn't seem to add much to the HTML tag as does the standard Modernizr.js file. 
Here's a sample with the custom modernizr only: 
js  k-ff k-ff24

And here's a sample with the standard modernizr: 
js no-flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths js  k-ff k-ff24

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 14 Oct 2013, 12:39 PM
Hello Jacques,

The kendo.modernizr.custom.js file represents a minimalistic custom version of Modernizr, which only adds support for styling HTML5 elements in legacy browsers, so that the default Kendo UI Visual Studio project template can look as expected.

If you need a full-blown Modernizr instance, you can remove the Kendo UI version and use your own.

The jQuery instance is pretty standard - you can use that or replace it with some another, given that it its version is compatible with the Kendo UI version.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jacques
Top achievements
Rank 2
answered on 14 Oct 2013, 12:52 PM
Thanks Dimo. 

If I remove the Kendo version of Modernizr though won't that remove js  k-ff k-ff24 which might be needed by Kendo? 

So essentially adding kendo's jQuery file and my own would have caused a conflict? I was under the impression Kendo would have done a noConflict kind of version using a different variable name other than $. 

Thanks,
Jacques
0
Dimo
Telerik team
answered on 14 Oct 2013, 01:23 PM
Hello Jacques,

Kendo UI relies on the k-ff and k-ff24 classes for browser detection in its stylesheets (in this case - Firefox 24) and these classes are added by the Kendo UI script, not by the Modernizr script.

With regard to jQuery, Kendo UI does not facilitate the usage of multiple jQuery instances on the page, as this is outside its scope, and in general, such a necessity is rare.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Integration with other JS libraries
Asked by
Jacques
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Jacques
Top achievements
Rank 2
Share this question
or