-1

I have found the youtube loading effect which I want to use in my wordpress theme. As this demo shows the effect triggering with button event. I want to add this to my wordpress theme by triggering URL event onclick.

So how to call this effect in our theme, when any URL on page is clicked?

Any pointers or suggestions to achieve this would be helpful. :)

4
  • damn, can i understand the reason for negative vote?
    – Ryu Ishida
    Commented Oct 15, 2013 at 13:51
  • because your question as you've phrased it doesn't have anything to do with WordPress specifically. your own answer doesn't really answer the question you originally asked.
    – Milo
    Commented Oct 15, 2013 at 18:38
  • doesn't matter anymore, it is solved. sometimes stackexchange is horros when people jump on attacking with authority.
    – Ryu Ishida
    Commented Oct 15, 2013 at 18:51
  • it's not an attack, it's an attempt to maintain the quality of answers available to the community. stackexchange is not a support forum, it's an archive of knowledge. downvoting is simply a mechanism to improve the signal to noise ratio, don't take it personally.
    – Milo
    Commented Oct 15, 2013 at 18:55

1 Answer 1

0

I added the Javascript file with the following code.

So if anyone is looking for this solution should use the below code in functions. I don't know who was so jobless to vote this question down but I am trying to fix my mistake of posting question here on stackexchange by answering my own question.

add_action( 'wp_enqueue_scripts', 'gen_progressbar');
function gen_progressbar() {
  wp_enqueue_script( 'custom-script', get_stylesheet_directory_uri() . '/js/gen-progress.js', array( 'jquery' ) );
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.