You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 25, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
***
4
4
5
-
- Version 0.4.0
5
+
- Version 0.4.1
6
6
- Requires jQuery 1.11.2 or higher (v2 not tested, v3 works but not extensively stress tested).
7
7
- Built by [Humaan](http://www.humaan.com)
8
8
@@ -50,7 +50,7 @@ Modaal is now setup and ready to be used with CDN [JSDelivr](http://www.jsdelivr
50
50
51
51
#### 1.4. The Basics
52
52
53
-
Out of the box Modaal is setup to work using inline content using as little customisation as possible. The first thing you'll require is a link to trigger the modal window. It's recommended that your `href` attribute targets a unique ID for a hidden element on the page containing your modal content. Like so..
53
+
Out of the box Modaal is setup to work using inline content using as little customisation as possible. The first thing you'll require is a link to trigger the modal window. It's recommended that your `href` attribute targets a unique ID for a hidden element on the page containing your modal content. Like so:
54
54
55
55
```html
56
56
<ahref="#inline"class="inline">Show</a>
@@ -62,6 +62,20 @@ Out of the box Modaal is setup to work using inline content using as little cust
62
62
$('.inline').modaal();
63
63
```
64
64
65
+
If you would prefer your trigger element is _not_ an `<a href="#">`, you can define a `content_source` value like so:
66
+
67
+
```html
68
+
<buttonclass="inline">Show</button>
69
+
<divid="inline"style="display:none;">
70
+
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p>
content_source|`string`|null||Accepts a string value for your target element, such as '#my-content'. This allows for when trigger element is an `<a href="#">` link. Not to be confused with the already existing `source` event.
80
95
animation|`string`|`fade`|`fade`, `none`|
81
96
animation_speed|`integer`|`300`||Animation speed is the duration it takes to reveal the Modaal window once triggered. It's important to note, that if you change this, you must also change the `after_callback_delay` below so that callback events sync up. This will be overwritten and set to `0` if `type` is `none`.
82
97
after_callback_delay|`integer`|`350`||Specify a delay value for the after open callbacks. This is necessary because with the bundled animations have a set duration in the bundled CSS. Specify a delay of the same amount as the animation duration in so more accurately fire the after open/close callbacks. Defaults 350, does not apply if animation is 'none', after open callbacks are dispatched immediately
@@ -115,6 +130,12 @@ To enable this, the Modaal trigger link must have a class of `modaal`, then you
It's important to note, that configuration options that contain an underscore (`_`) in them need to be replaced with a hyphen (`-`) in it's respective html attribute. For example, `overlay_opacity` configuration would read `data-overlay-opacity="0.8"`.
0 commit comments