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

  • SEARCH
  • Home
  • 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 8570825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:38:47+00:00 2026-06-11T18:38:47+00:00

I currently work with prototype, so for instance if i want to create a

  • 0

I currently work with prototype, so for instance if i want to create a class or something i would do something like (using it with asp.net)

function MyTestClass()
{

this.MyHtmlDiv = $("myHtmlDiv");
this.MyButton = $("myButton");
this.init();
}

MyTestClass.prototype.init = function()
{
  Event.Observe(...some code here ..);
  Event.Observe(...more code...);
}

So you get the idea. I like the way it is organized but I have read here in other posts that jquery is better. I would like to start using it but.. is it possible to create “classes” like this, neat?. I usually have a separate .js file for each aspx page. How can I create a class like this with JQuery?

Any pointers, links, ideas or suggestions would be appreciated. When I google this, I see some jquery functions but havent really found a nice template that i can follow to maintain it like above if i was to move to jquery.

  • 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-06-11T18:38:48+00:00Added an answer on June 11, 2026 at 6:38 pm

    jQuery has no confliction with the style you use now, you just need to change your mind of how jQuery selector work and how to bind event handler etc.

    function MyTestClass() {
      // note jQuery's selector is different from Prototype    
      this.MyHtmlDiv = $("#myHtmlDiv");
      this.MyButton = $("#myButton");
      this.init();
    }
    
    MyTestClass.prototype.init = function() {
      this.MyHtmlDiv.on('event_type', function() {
        // some code
      });
      this.MyButton.on('event_type', function() {
        // some code
      });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using 960 grid system to create a layout prototype. I would like to
I'm currently working on an Intranet application project, using ASP.NET MVC 3. One of
I currently work on a tracking project using a GPS receiver and a modem
Currently, the functioning prototype has everything it needs to work: A semi-transparent window for
I am currently working on a prototype that is using CSS3 multi columns for
I'm refactoring some code that currently looks like this: $$('#wrapper > div').each(function(e){ if((e.id!='header') &&
Hi currently I'm trying to get following snippet of code to work: function Entry()
I currently work on a magento webshop, which loads PrototypeJS as framework. However i
I currently work on a parser. I walk a tree, most of it being
I currently work in an environment where reports must be emailed to users as

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.