data-domajax-prefix

Set a prefix to all domajax options (then you're using data-<prefix><option> instead of data-<option>)


data-domajax-prefix) option allows to set a prefix to all domajax options, this is very helpful when you are using several javascript plugins that also use HTML5 data-* attributes.

Usage


  • data-domajax-prefix="(prefix)"
  • data-(prefix)endpoint="test.php"

Example


  • data-domajax-prefix="foo-"
  • data-foo-endpoint="test.php"

Live examples

This form looks like this:


        <input
            type="button"
            value="Click me"
            class="btn domajax click"
            data-domajax-prefix="foo-"
            data-foo-endpoint="domajax-prefix-simple-handler.php"
            data-foo-output="#output"
         />

        <div id="output"></div>

This form looks like this:


        <input
            id="button"
            type="button"
            value="Click me"
            class="btn domajax click"
            data-domajax-prefix="foo-"
            data-foo-endpoint="domajax-prefix-alias-handler.php"
            data-foo-alias="#alias"
         />

        <div
            id="alias"
            data-domajax-prefix="bar-"
            data-bar-output="#output"
            data-bar-lock="#button"
        ></div>

        <div id="output"></div>


Table of contents

All the documentation at a glance

Domajax options

And more with domajax