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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:47:27+00:00 2026-06-09T02:47:27+00:00

I have made a jQuery plugin which makes a splash screen. It uses the

  • 0

I have made a jQuery plugin which makes a splash screen. It uses the animate function of jQuery and is initalized and fired by the following:

    $('#temperature_splash').splashScreen();

    $('.tempGraphButton').click(function () {

        $('#temperature_splash').splashScreen('splash', 300);

         //Here, I would like to make an ajax request when the animation has finished
    }

I would like to make an ajax request after the animations in the plugin has finished but I don’t know how. Does anyone have any suggestions?

Outline of the plugin code

$.fn.splashScreen = function (method) {
    // Method calling logic
    if (methods[method]) {
        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
    } else if (typeof method === 'object' || !method) {
        return methods.init.apply(this, arguments);
    } else {
        $.error('Method ' + method + ' does not exist');
    }
}

var methods = {
    init: function () {
        //Some initializations
    },

    splash: function (time) {
        //Setting some properties

        splashScreenContent.animate({
            width: width,
            left: leftPos
        }, time).animate({
            height: height,
            top: topPos
        }, time);

        return false;
    }
}

})(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-09T02:47:29+00:00Added an answer on June 9, 2026 at 2:47 am

    just add a callback

    var methods = {
        init: function () {
            methods.splash(1000, function() {
                //do something when animation is finished
                methods.ajax();
            });
        },
        splash: function (time, callback) {
            splashScreenContent.animate({
                width: width,
                left: leftPos
            }, time).animate({
                height: height,
                top: topPos
            }, time, function() {
                if (typeof callback==='function') callback.call();
            });
    
            return false;
        },
        ajax: function() {
            //do ajax stuff
        }
    }
    

    It’s just an example, you’ll have to figure out what options to pass and how to tie it into your plugin yourself.

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

Sidebar

Related Questions

Inside of a jQuery plugin I made I have: $.getJSON(base_url,{ agenda_id:defaults.id, action:defaults.action+defaults.type, output:defaults.output },function(json){
I made my first jQuery plugin attempt, but I have this problem/bug which I
I have made a map with jQuery which is split up in many regions,
I have a div element which is made jquery Resizable. It has alsoResize option
I have been working on a jquery plugin that uses a HTML5 audio player
hi i have to make a jquery image plugin in drupal. i have made
I have made my own jQuery plugin, but it has problem that values I
I have made a CSS3 animation plugin for jquery that works perfectly in JS
Using jQuery validation plugin but it has no CSV validation. I have made an
I have made two jquery plugins which both work in their own right. If

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.