![](/img/trans.png)
[英]Jquery $('#div').show().delay(5000).hide(); doesn't work
[英]Using jQuery to hide a div by id doesn't work in Greasemonkey?
在此Newyorker網頁中 ,頂部邊框(顯示“ The Newyorker”)占用了大量空間。
我在“ developer Firefox edition”中打開了該網頁,並使用網頁檢查器發現邊框的div id是mobile-nav-container
。
那么,以下代碼為什么不起作用? :
// ==UserScript==
// @name newyorker
// @namespace N
// @include http://www.newyorker.com/*
// @version 1
// @grant none
// ==/UserScript==
console.log('Grease monkey start');
$('#mobile-nav-container').hide();
console.log('Grease monkey end');
好像他們在使用$函數做其他事情。 嘗試:
jQuery('#mobile-nav-container').hide();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.