How do you intergrate jquery library modules into your javascript framework using require js -


i cloned jquery library , tried integrate own javascript library without success.

i not need jquery functionality ,hence need load relevant jquery modules functionality want.i have been able load core module (core.js) , have utilized of functionality, functionality provided limited in unable chaining or simple stuff such html element selection.interestingly id selectors work fine, element creation not working.

example code of working , not working.

define([ "../jquery/src/core", "../jquery/src/selector", ], function(  jqcore, jqselector ){ //this works fine var div_element = jqcore("#mydiv");  //this not work ,i want understand why not working var body_element = jqcore("body");  //i understand why not able or should   code below work jqcore("p").append("<b>appended text</b>");  }) 

i using sizzle selector belive being loaded corrently not sure.

are sure included sizzle selector? (you claim load don't see implemented in code?)

see documentation https://github.com/jquery/jquery (chapter modules)

i believe paragraph describes problem having:

sizzle: sizzle selector engine. when module excluded, replaced rudimentary selector engine based on browser's queryselectorall method not support jquery selector extensions or enhanced semantics. see selector-native.js file details.

that explain basic selector support.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -