JQuery Plugins - how to?
Posted 13 December 2011 - 09:04 PM
So, I've been reading up a bunch and I'm still lost on this. I wish to add a jquery plugin called "advanced search" just after my nav. I think I kinda got the hook but not sure about the function since its a bit beyond me at the moment.
I got the hook from here:
and the video tutorial.
I have added text to my header area through php just not a plugin.
This is what I believe is part of what I need:
I named the function advanced search.
What goes in between
Is what I need to figure out.
I downloaded the plugin:
and uploaded it to here:
I also put this in my footer scripts area in pagelines.
I've read around on pagelines and I'm thinking I may need to add something like this:
Does this look right? Bueller?
I also got some info from here
Posted 13 December 2011 - 09:24 PM
Now, lets have a closer look. Your js script is in the wrong place for a start, you should never ever ever edit core wp files, or add new ones, breaks the ability to ever upgrade!
So lets assume you have the base theme installed and activated we will put the theme there.
so it becomes pagelines-template-theme/jquery.ryans_menu.js
Now you have attemted to load your js from inside the pagelines_section_after_postnav action, unfortunately the js will never load from here with wp_enqueue because its run too late. js needs to enqueued during wp_enqueue_scripts.
So that being said, your going to need to functions, one to include your js, and the other to work with it.
Now you add your second functions to do the actual munu:
Well i hope this gives you some pointers good luck!
Posted 02 February 2012 - 04:17 AM
Posted 03 February 2012 - 03:07 AM