JavaScript Plugin for the Yola Gang!

  • 1
  • Praise
  • Updated 7 years ago
Hello Again Yola!

I have finished a little JavaScript plugin that I would like to share here.
This is something that could be useful to lots of people.
I have created a Plugin for a Redirect timer.
I got the idea when Mike requested the code on Anything We Can Do so thank you!

You can check out the example here!

I'm happy to tell you that anyone can use this code. Even if you dont know Javascript.

Code:


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type='text/javascript'>
Button_Value = "Redirect" ; //Text inside the Button
Redirect_URL = "http://google.com"; //The URL that you will be redirected to after the timer is up
Seconds = "15"; //Numbers of Seconds on timer (1-60 Recommended)
</script>
<script type="text/javascript" src="http://yolatools.yolasite.com/resources/timer.latest.js"></script>


Now these are just started Options, there are 10 more options that you can implement:


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type='text/javascript'>
Button_Value = "Redirect" ; //Text inside the Button
Redirect_URL = "http://google.com"; //The URL that you will be redirected to after the timer is up
Seconds = "15"; //Numbers of Seconds on timer (1-60 Recommended)
Button_Position = "right"; //Left or Right
Number_Color = "red"; //Color of the timer Number
Number_Size = "35"; //Size of the timer Number
Redirect_Box_Padding = "23"; //How much space is between the text and the border
Redirect_Box_Radius = "10"; //Radius of the Redirect Box
Button_Border_Width = "1"; //How wide the Buttons Border is
Button_Border_Line_Type = "solid"; //What type of line the Button of the Border is
Button_Padding = "12"; //How much space is between the text and the border
Button_Radius = "13"; //How much the the edges are turned
Loading_IMG = "http://moviereviews.com/images/loading_button3.gif"; //Loading image for the redirect
</script>
<script type="text/javascript" src="resources/timer.latest.js"></script>


Note that you guys are using the timer.latest javascript which means you will always have the most updated version. This is highly recommended as we will be changing the code a lot!
--------------------------------------------------------------
Now what I wanna discuss is about adding the feature for you guys to be able to change the Gradient for the Button and/or Redirect Box. This might be making the options list a little big but would be a very useful feature! What do you think?
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
  • excited

Posted 7 years ago

  • 1
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hello Shawn,

Thanks for sharing!
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
Your Welcome!
Any day!
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
I hoping for more feedback so.............