Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Sebastien Vauban" Newsgroups: comp.lang.javascript Subject: Re: Why is .click() not effective and requires us to press on Refresh? Date: Thu, 05 Jul 2012 09:23:12 +0200 Organization: Sebastien Vauban Lines: 42 Message-ID: <80r4sqwu1r.fsf@somewhere.org> References: <807guldukp.fsf@somewhere.org> <804npndfpj.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx04.eternal-september.org; posting-host="XagHMo1qM1HuK1lQg5GM9g"; logging-data="16128"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WmHwfTcMC3Y6WqPLSDSmf" User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:Cq+H9lS2njpZf7ocWEj7RNYL5QU= sha1:dht5yDXwcBd8KWjodgmlsE7FVFA= X-Url: Under construction... Xref: csiph.com comp.lang.javascript:14864 Hi Gregor, Gregor Kofler wrote: > Am 2012-07-04 11:43, Sebastien Vauban meinte: >> Gregor Kofler wrote: >>> Am 2012-07-03 12:09, Sebastien Vauban meinte: >>>> I've made up an example of what I'm trying to achieve in >>>> http://jsfiddle.net/svajquery/ttVUA/4/. >>>> >>>> I have "tabified" all H2, and want to click on a link in the first tab >>>> ("Dashboard") and want to be redirected on the right place of the second tab >>>> ("Tasks"). >>>> >>>> While the URL is correctly displayed in the address bar of the browser (at >>>> least when testing those files in a real browser environment), the .click() is >>>> not effective. I must press on the Refresh button to really go where I want >>>> to. >>>> >>>> Do you have any explanation? I surely miss something! > > Perhaps some old-school debugging would help. As an example: > > does $(this.hash) result in a DOM element? As I said, I'm absolutely no expert. How do you test that? With an alert box? > Do what does this.hash evaluate in this line? $("tab1") probably won't do > the trick, but $(".tab1") could work. If I write: alert($(this.hash)); the only thing I see displayed is: [object Object] If I write: alert($(this.hash).toSource()); I get: ({length:1, 0:({}), context:({}), selector:"#dashboards"}) Does this help? Best regards, Seb -- Sebastien Vauban