How to use trigger in functions.js to show pages
-
I’m using gridfocus theme and it uses a very simple functions script. It shows a nice dropdown where the function toggles categories. See here (https://www.mediasinfo.ro – click on “Stiri” in the footer navigation).
I have been trying to extend the functionality and add a second button in the menu, to show pages. I tried copying (& changing the ID of course) of the trigger function used for categories. Unfortunately, the function is not correct. I changed the name to triggerPageID and obviously there’s no such thing.. It looks wierd though, as the function keeps calling the Categories IDs. I’ve copy-pasted the function.js content below:
jQuery(document).ready(function() { // easy toggle for categories jQuery('#triggerCatID').click(function() { jQuery(this).toggleClass('focus'); jQuery('#headerStrip').animate({ height: 'toggle', opacity: '100'}, 100); return false; }); jQuery('#triggerCatID2').click(function() { jQuery(this).toggleClass('focus'); jQuery('#footerStrip').animate({ height: 'toggle', opacity: '100'}, 100); return false; }); jQuery('#triggerPageID').click(function() { jQuery(this).toggleClass('focus'); jQuery('#footerStrip').animate({ height: 'toggle', opacity: '100'}, 100); return false; }); });
Any idea how can this be fixed? Do you have any reading recommendations?
Many thanks in advance.
- The topic ‘How to use trigger in functions.js to show pages’ is closed to new replies.