-
-
Download from official page or release page.
-
-
Insert the following codes between the
<head>
tags.<script src="https://www.atatc.net/turnright/turn-right.js"></script>
-
For example, save the .js file as
assets/js/turn-right.js
, and insert the following codes between the<head>
tags.<script src="assets/js/turn-right.js"></script>
-
-
-
-
Use property
url
to specify the target url you want to redirect to. For example, I want to redirect tohttps://www.atatc.net
, I can code like this:<turn-right url="https://www.atatc.net"></turn-right>
The protocol names like
http://
orhttps://
are dispensable. If not sepcified, it will be regarded ashttps://
. -
-
See
demo-immediately.html
or visit online demo page for the actual effect.To redirect immediately, having loaded the page, specify property
wait
asfalse
.<turn-right url="(e.g) https://www.atatc.net" wait=false></turn-right>
Property
wait
can be either boolean or boolean-string. It's set astrue
defaultly.However, in this case, only the first
<turn-right>
in the entire page will be triggered. -
See
demo-afterclicking.html
or visit online demo page for the actual effect.To redirect after an action, set an
id
and optionally specify propertywait
astrue
.<turn-right id="tr_a" url="(e.g) https://www.atatc.net"></turn-right>
or
<turn-right id="tr_a" url="(e.g) https://www.atatc.net" wait=true></turn-right>
Then trigger the redirection through JavaScript when needed.
let tr_a = document.getElementById("tr_a"); tr_a.turnRight();
-
-
Introduced in version 0.0.2.
If you don't want a tag to be activated, set property
pass
astrue
.<turn-right url="(e.g) https://www.atatc.net" pass=true></turn-right>
Property
pass
can be either boolean or boolean-string. It's set asfalse
defaultly.
-