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 8070807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:30:50+00:00 2026-06-05T13:30:50+00:00

i am trying to learn building own jquery plugin . with the simple example

  • 0

i am trying to learn building own jquery plugin . with the simple example but i am getting error while executing it .planning to build plugin for

Loan calculator

can some help me regarding error “

Object Expected

my javascript in the index.html goes like this …

$(function(){
    $('#btn').click(function() {
     var roi=getie();  //  ROI - rate of interest - value of i receved from function getie()
    $("#i").val(roi);  // input type 'text ' to display Interest (i) value
    });

});

and the plugin codgin for custom function

getie()

goes like this in separate

calculate.js file

CODE :

(function($){
    //Attach this new method to jQuery
    $.fn.extend({ 
            //This is where you write your plugin's name
       getie: function() {
            //Iterate over the current set of matched elements
            return this.each(function() {
             var  i=20;
             return i;
             });
        }
    });


})(jQuery);

i am using jquery-1.7.2.min.js and query-ui-1.8.20.custom.min.js as other js file in this .

  • 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-05T13:30:52+00:00Added an answer on June 5, 2026 at 1:30 pm

    With $.fn.extend you extend jquery and don’t create an object. So you must call it on a jquery object:

    $(this).getie()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to learn GWT for quite a while, I want to build
Me again, Trying to learn some jQuery stuff. Now I'm building an AJAX search
Trying to learn a bit of XUL but am a bit stuck. Building a
I'm trying to learn CakePHP by building a simple CMS app, it was going
I am trying to learn Spring framework by building simple website, now I have
I'm trying to learn Make and building a Makefile into my app to help
I'm trying to learn effective DDD practices as I go, but had a fundamental
Possible Duplicate: TFS 2010 Custom Build Activity TF215097 error I'm trying to create a
I'm trying to learn jquery mobile and I was wondering if jquery mobile can
I'm new to databases and web development but I'm trying my best to learn

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.