পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Monday, February 13, 2017

BackboneJS - Events

Events are capable of binding objects and trigger custom events i.e. you can bind the custom events by using the desired name of our choice.
The following table lists down all the methods which you can use to manipulate the BackboneJS-Events −

S.No. Methods & Description
1 on It binds an event to an object and executes the callback whenever an event is fired.
2 off It removes callback functions or all events from an object.
3 trigger It invokes the callback functions for the given events.
4 once It extends the backbone.Model class while creating your own backbone Model.
5 listenTo It informs one object to listen to an event on another object.
6 stopListening It can be used to stop listening to events on the other objects.
7 listenToOnce It causes the listenTo occur only once before the callback function is being removed.

Catalog of Built-in Events

BackboneJS allows the use of global events wherever necessary in your application. It contains some of the built-in events with arguments as shown in the following table −
S.No. Events & Description
1 "add"(model, collection, options)
It used when a model is added to the collection.
2 "remove"(model, collection, options)
It removes a model from the collection.
3 "reset"(collection, options)
It is used to reset the collection content.
4 "sort"(collection, options)
It is used when a collection needs to resorted.
5 "change"(model, options)
It is used when changes are to be made to a model's attributes.
6 "change:[attribute]"(model, value, options)
It is used when there is an update in an attribute.
7 "destroy"(model, collection, options)
It fires when the model is destroyed.
8 "request"(model_or_collection, xhr, options)
It is used when a model or a collection starts requesting to the server.
9 "sync"(model_or_collection, resp, options)
It is used when a model or a collection is synced successfully with the server.
10 "error"(model_or_collection, resp, options)
It activates when there is an error in requesting to the server.
11 "invalid"(model, error, options)
When there is a fail in model validation, it returns invalid.
12 "route:[name]"(params)
When there is a specific route match, this event can be used.
13 "route"(route,params)
It is used when there is a match with any route.
14 "route"(router, route, params)
It is used by history when there is a match with any route.
15 "all"
It fires for all the triggered events by the passing event name as the first argument.

No comments:

Post a Comment