I am a complete newbie when it comes to JS. I actually paid someone to write some JS for me but I need to tweak some stuff and I don't feel like hiring another person for just a few tweaks so I come to you for help.
The first issue is a wordpress plugin called Heads Up Bar. So fist thing I do is launch up the developer tools within Chrome and locate where its called on. I come across this:
jQuery(document).ready(function($) {
var data = {
action: 'ehu_show_bar',
home: ehu_is_home_pg
};
jQuery.post(ajaxurl, data, function(response) {
jQuery('body').prepend(response);
if(ehu_animate === 'toggle'){
jQuery('#ehu_bar').css('display', 'none');
jQuery('#ehu_bar').slideToggle('fast');
}
});
then I went and looked at the JS he created which looks a little like this:
jQuery(document).ready(function() {
jQuery('#header').hide();
jQuery('#sidebar').hide();
jQuery('.main_navi').hide();
jQuery('.category_navi_outer').hide();
jQuery('.home_banner').hide();
jQuery('.breadcrumb').hide();
So I create a new line called
jQuery('#ehu_bar').hide();
thinking it would be so easy. Obviously it didn't work. What am I missing? This plugin appears on every page of the site but sometimes its limited to only the homepage. What do I have to do now?
The next thing I need to hide is a JS from google ads. This appears in almost every post within wordpress but not in the homepage. I know the name of the JS, meaning I know what the file is called:
show_ads.js
and it is located in the product_detail.php file. What will it take to hide this google ad using JS?
Like I said, I am a bit new to this but I learn quickly. I would appreciate any help. Thanks!
.ready(...
block?