Tagged: tabs
-
AuthorPosts
-
August 11, 2015 at 9:43 am #485791
Hi I have an unusual question.
Client wants the tabs I added to his page Change the content on mouse-over. It obviously would only be for desktop as hover does not work on mobile. Can you help me with this?
- This topic was modified 9 years, 3 months ago by Diezel23.
August 11, 2015 at 5:40 pm #486092Hi Gavin!
Try changing line 2605 in the /enfold/js/shortcodes.js file from this.
tab.addClass('tab_counter_'+i).bind('click', function()
To this.
tab.addClass('tab_counter_'+i).bind('onmouseover', function()
Best regards,
ElliottAugust 11, 2015 at 7:59 pm #486146Hi Elliot
Not sure if it will pick it automatically or not. I have a child theme and copied the js folder and shortcodes.js to the child theme. i’ve made the alterations as you suggested but to no avail. Am i suppose to reference the shortcode.js from the functions.php or not.
August 11, 2015 at 8:10 pm #486149Hey!
Please add following code to Functions.php file of your child theme
function wp_change_shortcodejs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/shortcodes.js', array('jquery'), 2, true ); } add_action( 'wp_print_scripts', 'wp_change_shortcodejs', 100 );
and move modified file inside /js folder
Regards,
YigitAugust 11, 2015 at 10:12 pm #486205Hi Yigit
Yeah done that but still does not work
August 11, 2015 at 10:17 pm #486209Yigit
Why do you use – add_action( ‘wp_print_scripts’, ‘wp_change_shortcodejs’, 100 );
and not – add_action( ‘wp_enqueue_scripts’, ‘wp_change_shortcodejs’ );your option did not load the shortcodes the second one did….
- This reply was modified 9 years, 3 months ago by Diezel23.
August 12, 2015 at 12:09 am #486244Hi!
So, is the issue fixed now? Please let us know…
Best regards,
BasilisAugust 13, 2015 at 2:26 pm #487205Nope is still does not work
August 13, 2015 at 5:31 pm #487334Hey!
Sorry, it looks like they changed the handler in later versions of jQuery. Try this instead.
tab.addClass('tab_counter_'+i).bind('mouseenter', function()
Cheers!
ElliottJuly 12, 2016 at 5:09 pm #659984tab.addClass('tab_counter_'+i).bind('mouseenter', function()
This does not work.
Sorry! I forgot to clear the cache.- This reply was modified 8 years, 4 months ago by zhitya.
July 13, 2016 at 12:18 pm #660326 -
AuthorPosts
- The topic ‘Change Tab click event to hover on desktop’ is closed to new replies.