
M4Q Population
Population
The main object named by: m4q
. If window.$
is undefined, m4q
use its.
To add alias $
for m4q manually, you can use method m4q.global()
. To relinquish m4q's control of the $
, you can use method m4q.noConflict([true])
.
Gains control of $
<script src="metro.js">
$ - is a m4q constructor
$ not a free
<script src="jquery.js">
<script src="metro.js">
$ - is a jquery constructor
Relinquish m4q's control of the $
<script src="metro.js">
<script>
$.noConflict();
</script>
$ - now have is a previous value
Capture and relinquish of the $
<script src="jquery.js">
<script src="metro.js">
<script>
m4q.global(); // $ - now is a m4q constructor
m4q.noConflict(); // $ - now is a jquery constructor
</script>
Populate Metro 4 components to the jQuery.fn
Metro 4 by default delegates functions to jquery.fn
if jQuery is present.
If you don't have work with Metro 4 components with jQuery, you must define it with special meta tag and set it to false (default value is true).
<meta name="metro4:jquery" content="false">
<meta name="metro4:jquery" content="true">
<div id="a1">
...
</div>
<script src="jquery.js"></script>
<script src="metro.js"></script>
<script>
jQuery("#a1").accordion(); // init with jquery
</script>
<meta name="metro4:jquery" content="false">
<div id="a1">
...
</div>
<script src="jquery.js"></script>
<script src="metro.js"></script>
<script>
m4q("#a1").accordion(); // init with m4q
</script>