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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:41:21+00:00 2026-05-17T02:41:21+00:00

When I look at the JQuery plugin code, it almost seems to me that

  • 0

When I look at the JQuery plugin code, it almost seems to me that we are creating a function (although we use the JQuery.fn syntax) Functionally, what’s a difference between a function and a plugin?

  • 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-17T02:41:22+00:00Added an answer on May 17, 2026 at 2:41 am

    A function is just a normal JavaScript function, for example:

    function doSomething(param) {
      alert(param);
    }
    

    A plugin is intended to be run on a set of elements, for example:

    jQuery.fn.plugin = function(param) {
      return this.attr('something', param);
    }
    

    This would set the 'something' attribute on all elements it was called on, like this:

    $('.selector').plugin('value');
    

    If you intend to use the function on a set of elements, like in a jQuery chain, then a plugin may be the answer for you…if you’re just calling a function and doing stuff, really having nothing to do with a set of elements, use a plain named function.

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

Sidebar

Related Questions

I have a JQuery validation files that look as follow: $('#TextBoxRisultati2b').on('blur', function () {
I was taking a look on the jquery.validate plugin source code , to check
i'm doing a jquery plugin of my own. have a look at this code
i am using a jquery plugin and my code look somthing like this. <script
I make a jquery plugin look like: (function($){ $.fn.plugin_name = function(){ var methods =
Take a look at this snazy plugin: http://remysharp.com/2007/12/28/jquery-tag-suggestion/ ** it's real small Source: http://remysharp.com/downloads/tag.js
If we look at the latest jQuery source at http://code.jquery.com/jquery-latest.js we see the following:
I find that JQuery Mobile pages look good on MDPI devices (like G1) but
I have successfully worked with jQuery DataTables and they look and function great. But
Code Igniter version '2.0.3' Jquery 1.7 Jquery History plugin I have a CodeIgniter app

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.