English 中文(简体)
Hide Javascript or CSS with Javascript?
原标题:Hide Javascript or CSS with Javascript?

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.

第一个问题是“ Heads”一词。 因此,我确实在 Chrome和位于其呼吁的地方推出开发器工具。 我来到这里:

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 );
    }

});

接着,我去看他创建的“共同提交”文件。

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();

因此,我设立了一条新路线,称为一条新路线。

jQuery( #ehu_bar ).hide();

认为如此容易。 显然,它没有工作。 我失踪了什么? 这一图形出现在网站的每一页,但有时只局限于主页。 现在我必须做些什么?

我所要隐藏的下一个东西是一份从古角度谈出来的联合材料。 这在a 几乎每个字句中,但不在主页上。 我知道联合材料的名称,意思是,我知道该档案的名称是:

show_ads.js

and it is located in the product_detail.php file. What will it take to hide this google ad using JS?

同我一样,我是这方面的一个新点,但我很快学习了。 我感谢任何帮助。 感谢!

最佳回答

The third parameter to the jQuery.post(ajaxurl, data, ... is a method that is called when the AJAX request is finished. It will take a few milliseconds from when the page loads to do the AJAX request, so the order of what will actually happen is:

jQuery( #ehu_bar ).hide(); // from jQuery(document).ready(..

接下来是几轮:

jQuery( #ehu_bar ).slideToggle( fast ); // from ajax callback
// This line effectively is like calling jQuery( #ehu_bar ).show() but with an animation

在<条码>上评论<>slide Toggle,你应为“OK”。

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签