HREF tag within a plugin
I have a problem and after hours of trying I’m not able to find a solution for it. I have to implement a link in the output of a wordpress plugin which scrolls the whole page to the top.
Therefore I have written a jQuery function called “scrolling”. It’s in a script.js file in my template folder.
If I put the HREF Tag (
<a href="#" id="scrolling">Scroll up</a>) into a wordpress post, everything works fine as it should. The page scrolls up. But if I try to use it in the plugin directly….
….else return '<a href="#" id="scrolling">Scroll up</a>' ;}
…. it doesn’t work. The link is at the right place on the blog, but the jQuery function isn’t called up. Why that? Is the id not passed to the script?! Maybe you can give me a hint. 🙂
- The topic ‘HREF tag within a plugin’ is closed to new replies.