How to remove tooltip javascript snippet via child theme
-
As I mentioned in another thread, I love Unconditional and I am using it for my new podcast – http://advancedfantasystrategy.com
I am not a big fan of the automatic tooltip, however.
What is the best practice to remove the tooltip via child theme?
Being the tooltip is an opt-in Bootstrap feature, support is added in /assets/js/custom.js in the parent theme to activate it.
The snippet of code that activates the tooltip is:
jQuery(function(){
jQuery(‘a[title]’).tooltip();
});My initial thoughts:
1 – Target .tooltip via CSS and display: none;. The problem here, is I am not completely sure if there are other features of the theme that use a .tooltip class.
2 – I could copy all the contents of Unconditional’s custom.js file, leaving out the tooltip activation and create a new one in my child theme. wp_dequeue_script the parent custom.js, then enqueue mine. The problem here – With every theme update, I will need to remember to check the custom.js file for changes, then make those changes to my child custom.js file. (NOTE – This is my website, not a client’s website, so it is an option, but I won’t learn the right way if I do this).So, what is the proper way to remove this javascript snippet/Bootstrap feature via my child theme?
OR – Maybe the developer would add an theme option to turn off tooltips? 🙂
The topic ‘How to remove tooltip javascript snippet via child theme’ is closed to new replies.
