PHPackages                             zzortell/zz-ajaxpopupjs-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zzortell/zz-ajaxpopupjs-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

zzortell/zz-ajaxpopupjs-bundle
==============================

AjaxPopup.js is a jQuery plugin which displays HTML requested by Ajax in a popup.

v1.0.1(9y ago)1281MITJavaScript

Since May 31Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Zzortell/AjaxPopup.js)[ Packagist](https://packagist.org/packages/zzortell/zz-ajaxpopupjs-bundle)[ RSS](/packages/zzortell-zz-ajaxpopupjs-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (0)

AjaxPopup.js
============

[](#ajaxpopupjs)

AjaxPopup.js is a jQuery plugin which allows you to focus on backend when you just want to display HTML requested by Ajax in a popup.

AjaxPopup.js is able to follow links and handle form submission.

Can be used with Symfony 3 or standalone.

An example application made with Symfony 3 is available [here](https://github.com/Zzortell/AjaxPopupExample).

Installation
------------

[](#installation)

### Standalone installation

[](#standalone-installation)

Download this folder: [src/Zz/AjaxPopupJsBundle/Resources/public/](https://github.com/Zzortell/AjaxPopup.js/tree/master/Resources/public).

Include jQuery in your project:

```

```

Include AjaxPopup.js:

```

```

Include AjaxPopup.css:

```

```

Don't forget to replace `...` by the installation folder.

### Symfony 3 installation

[](#symfony-3-installation)

Download via Composer:

```
composer require zzortell/zz-ajaxpopupjs-bundle
```

Enable bundle in the kernel:

```
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            ...
            new Zz\AjaxPopupJsBundle\ZzAjaxPopupJsBundle(),
        ];

        ...
    }
}
```

Don't forget to install assets:

```
bin/console assets:install
# or
bin/console assets:install web --symlink --relative
```

Include jQuery in your project:

```

```

Include AjaxPopup.js:

```

```

Include AjaxPopup.css:

```

```

Usage
-----

[](#usage)

Step 1: Make AjaxPopup.js handle the request of a popup.

```

    $(document).ready(function() {
        var popup = $.AjaxPopup({
            // This is default configuration

            "overlay_color": "rgba(0,0,0,0.2)",
            "loader_color": "#3498db", // blue
            "loader_circle_color": "#f3f3f3", // light grey
            "use_loader": true,
            "loader": null, // e.g. $("#loader"),

            "open_now": null, // put an url to open on document ready
            "buttons_selector": "button[ajax-url]",

            "follow_links": true,
            "control_forms": true,
            "control_buttons": true,
        });
    } );

```

Step 2: Enjoy!

When triggered (see triggering options below), AjaxPopup requests HTML via Ajax. When the new content is received, AjaxPopup checks for buttons, links and forms and handles them according to the given options.

The server HAS TO send 200 status. A 205 status can also be send to make reload the page (usefull for login for example).

Click on the overlay or press `Echap` to close the popup.

### Settings options

[](#settings-options)

- overlay\_color: Color of the overlay, by defaut transparent grey. Set opacity to 0 to not have overlay color.
- loader\_color: Color of the default loader.
- loader\_circle\_color: Color of the circle of the default loader.
- use\_loader: If set true, will display a loader waiting for the server response.
- loader: A jQuery element. If set null, the default loader is used.

### Triggering options

[](#triggering-options)

- open\_now: Give an url to display the popup on document ready, or immediatly if modified using API.
- buttons\_selector: A jQuery selector which can refers to buttons or other elements. Each of these elements has to have a `ajax-url` attribute. Cliking on these elements will display the popup. The jQuery selector can also refers to buttons inside the popup (for example, in a login form you can put a "Register" button to make AjaxPopup load a registration form).

### Behavior options

[](#behavior-options)

- follow\_links: If set true, AjaxPopup will reload the content of the popup when the user click on a link inside the popup, with the given url. Will not follow the link if the specified `target` is not `_self`.
- control\_forms: If set true, AjaxPopup will handle form submission inside the popup and reload the content of the popup with server's response.
- control\_buttons: If set true, AjaxPopup will handle buttons inside the popup like ones outside.

### API

[](#api)

The object returned by $().AjaxPopup() has several methods:

```
popup.display(url, method = 'GET', data = null);
popup.hide();
popup.hideAll(); // Hide all popups, not only this instance.
popup.getOptions();
popup.setOptions();
```

Improve this library
--------------------

[](#improve-this-library)

This library is published under the [MIT license](https://github.com/Zzortell/AjaxPopup.js/blob/master/LICENSE).

If you find a bug, or if you want to propose a feature, please open an issue or post pull-request.

If you use this library, please let's me know!

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

3312d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b51dd8c03ccf7ffa6feb5357c163f70da504d5cc7a137ea5481c376fc20336f?d=identicon)[Zzortell](/maintainers/Zzortell)

---

Top Contributors

[![remi-blaise](https://avatars.githubusercontent.com/u/9931240?v=4)](https://github.com/remi-blaise "remi-blaise (6 commits)")

---

Tags

ajaxajax-formajax-popuppopupsymfony3-bundleajaxpopupajax-formsymfony3-bundleajax-popup

### Embed Badge

![Health badge](/badges/zzortell-zz-ajaxpopupjs-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/zzortell-zz-ajaxpopupjs-bundle/health.svg)](https://phpackages.com/packages/zzortell-zz-ajaxpopupjs-bundle)
```

###  Alternatives

[webcreate/jquery-ias

Infinite Ajax Scroll: A jQuery plugin that turns your server-side pagination into an infinite scrolling one using AJAX

900727.5k3](/packages/webcreate-jquery-ias)[kartik-v/yii2-tree-manager

An enhanced tree management module with tree node selection and manipulation using nested sets.

151545.0k15](/packages/kartik-v-yii2-tree-manager)[ziffmedia/nova-select-plus

A Nova select field for simple and complex select inputs

96598.5k2](/packages/ziffmedia-nova-select-plus)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73147.2k29](/packages/jaxon-php-jaxon-core)[demogorgorn/yii2-ajax-submit-button

AjaxSubmitButton renders an ajax button which is very similar to ajaxSubmitButton from Yii1.

27135.8k1](/packages/demogorgorn-yii2-ajax-submit-button)[risul/laravel-like-comment

Ajax based site wide like and comment system for laravel

1087.3k](/packages/risul-laravel-like-comment)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
