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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:25:00+00:00 2026-06-15T05:25:00+00:00

http://jsbin.com/ukizof/1/ how do you call a function which is part of a array and

  • 0

http://jsbin.com/ukizof/1/
how do you call a function which is part of a array and set a paramater to it , as in the example below i want the script to return a function in order to call a function parameter which as below in the example is set below.

   var bQuery = {
        one: function(elem, options) {
            options = this.extend({
                method: 'html',
                event: 'test2',
              func:null
            }, options || {});
            var element = elem;

            if (options.method == 'html') {
                element.innerHTML = options.event;
            } else if (options.method == 'append') {
                element.innerHTML = element.innerHTML + options.event;
            } else if (options.method == 'prepend') {
                element.innerHTML = options.event + element.innerHTML;

            }
          return // return method to apply string to func: parameter function as below is "e"


        },
        extend: function(a, b) {
            for (var prop in b) {
                a[prop] = b[prop];
            }
            return a;
        }
    };
    $ = bQuery;
    $.one(document.getElementById("log"), {
        method: 'append',
        event: 'rjfjfjjffj',
        func: function(e){
          alert(e);
        }
    });
  • 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-15T05:25:03+00:00Added an answer on June 15, 2026 at 5:25 am

    If I understood you right, you want

    var options, element;
    …
    return function() {
        if (typeof options.func == 'function')
            return options.func(element.innerHTML);
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this example: http://jsbin.com/anoyik/edit#preview http://jsbin.com/anoyik/edit#source How can I set the red box's width to
In this example http://jsbin.com/inoka4 no width is defined for parent element if i want
here's the example: http://jsbin.com/izegoy problem: https://i.stack.imgur.com/XSHZR.png script: $(document).ready(function(){ $(p:eq(1)).hide().after(<span>View more</span>); $(span).click(function(){ $(p:eq(1)).slideToggle(200,function(){ if($(span).text()==View more){
http://jsbin.com/ifoguf/14/edit#javascript I attempted Isolating the Inheritance Part into a Function, but when I create
Here's the example: http://jsbin.com/ovupuq/3 $(document).ready(function(){ var cursor = $(<span>_</span>).appendTo(p), blik = function(){ $(cursor).toggle(200); };
Code as reference: http://jsbin.com/aboca3/2/edit In this example above (thank you SLaks) I am truncating
Play with it here: http://jsbin.com/ocicu4/4/edit Simple Accordion, I only want one section open at
Hi I have a code example available here: http://jsbin.com/oxoweh My problem is that I
Take a look at my code example at js bin: http://jsbin.com/iritep/3/edit I'd like to
Please see see code http://jsbin.com/eveqe3/edit , also quoted below. I need to show text

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.