Backbone.js and jQuery

后端 未结 4 1202
悲&欢浪女
悲&欢浪女 2021-01-29 18:02

It is said that Backbone handles all the higher level abstractions, while jQuery or similar libraries work with the DOM, normalize events and so on..

Could someone pleas

4条回答
  •  庸人自扰
    2021-01-29 18:42

    Backbone is a MV* framework while jQuery is a DOM toolkit.

    The main features of an MV* application are routing, data binding, templates/views, models, and data access. Backbone could dependant on jQuery partially.

    jQuery is a solid API for querying the DOM with extensive browser support and a vibrant community. It comes with event handling, deferred objects, and animations.

    Simple event binding using jQuery

    // When any 

    tag is clicked, we expect to see '

    was clicked' in the console. $( "p" ).on( "click", function() { console.log( "

    was clicked" ); });

提交回复
热议问题