Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3665642
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:47:08+00:00 2026-05-19T01:47:08+00:00

I learned how to develop in Javascript using the YUI 2 library and was

  • 0

I learned how to develop in Javascript using the YUI 2 library and was wondering if there were a jQuery equivalent of Custom Events (http://developer.yahoo.com/yui/event/#customevent)

Specifically, I want to be able to define custom events without having to attach the listeners initially.

In YUI, I would create a page class and declare different custom events that can be subscribed to. Below is some example code to demonstrate what I want to do, but with jQuery

function ListPage() {
    var me = this;
    this.initEvent = new YAHOO.util.CustomEvent("initEvent");

    this.init = function() {
         // initialize events, DOM, etc
         this.initEvent.fire(me);
    }
}

In application Javascript, I would then like to subscribe to the initEvent.

var page = new ListPage();
page.initEvent.subscribe(
    function (type, args) {
        // do stuff here
    }
);

page.init();

Are there any tutorials/examples of something like this in jQuery?

I understand I can do something similar using bind() and trigger(), but the impression I get is I have to pass in an event handler when I call bind().

Is it possible in jQuery to create the custom event, but pass in the event handler later?

I hope my question makes sense. thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:47:09+00:00Added an answer on May 19, 2026 at 1:47 am

    There are lots of pub/sub plugins for jquery.

    Example – Rebecca Murphy screencast

    Plugins – Ben Almans pubsub, Phiggins pubsub

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am entry level .Net developer and using it to develop web sites. I
I learned that by trying to use the tablesorter plug in from jquery the
I learned Why Request.Browser.Crawler is Always False in C# ( http://www.digcode.com/default.aspx?page=ed51cde3-d979-4daf-afae-fa6192562ea9&article=bc3a7a4f-f53e-4f88-8e9c-c9337f6c05a0 ). Does anyone
I've recently learned core Java and want to develop my skills further with practice
I learned the object-oriented in Java. Now in develop in C#. This means that
Sometimes I need to develop a simple database application using MS Access Databases. I`ve
I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java
I learned Java in college, and then I was hired by a C# shop
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
I learned some time ago about Decision Trees and Decision tables. I feel that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.