Magic Icon Open New Windows: Magic JavaScript

Quick Jump ↵

Usage

Add data-mjf="open_new_win|return_false" data-mjf_win_dim="normal(OR)WxH" id="ELEMENT_ID" to your clickable tag. WxH would be the new window's dimensions.

Add <script type="text/javascript">$m.wand.open_new_win = true;</script> inside your <body> tag.

Examples

Normal Pop Up

<a href="http://www.google.com/" data-mjf="open_new_win|return_false" data-mjf_win_dim="normal" id="open_new_win">Normal Pop Up</a>

300 x 300 Pop Up

<a href="http://www.google.com/" data-mjf="open_new_win|return_false" data-mjf_win_dim="300x300" id="open_300_win">300 x 300 Pop Up</a>

Notes

Add data-mjf_ga_track="false" if you don't want Google Analytics to track the particular click.

Window dimensions aren't supported in touch-based browsers.

« Back to the main documentation