[jQuery] Re: Open div by URL?

2009-06-11 Thread waseem sabjee
yeah...i'm still kinda new to JQuery been playing around with it a lot...may be a noob question but what is the OP ? On Thu, Jun 11, 2009 at 7:48 AM, Ricardo ricardob...@gmail.com wrote: Oops, you're right. I answered waseem's message without looking at the OP. On Jun 10, 6:00 pm, mkmanning

[jQuery] Re: Open div by URL?

2009-06-11 Thread brian
OP: original post On Thu, Jun 11, 2009 at 11:11 AM, waseem sabjeewaseemsab...@gmail.com wrote: yeah...i'm still kinda new to JQuery been playing around with it a lot...may be a noob question but what is the OP ? On Thu, Jun 11, 2009 at 7:48 AM, Ricardo ricardob...@gmail.com wrote: Oops,

[jQuery] Re: Open div by URL?

2009-06-11 Thread waseem sabjee
k k thanks...though i expected something else lol. On Thu, Jun 11, 2009 at 5:17 PM, brian bally.z...@gmail.com wrote: OP: original post On Thu, Jun 11, 2009 at 11:11 AM, waseem sabjeewaseemsab...@gmail.com wrote: yeah...i'm still kinda new to JQuery been playing around with it a

[jQuery] Re: Open div by URL?

2009-06-10 Thread deltaf
Can you check the url during the ready() on the FAQ page and various click() events within the page to create this effect? On Jun 10, 6:24 am, Bennobo benn...@googlemail.com wrote: Can I teach jquery to open a specific div by URL? Example:http://www.domain.com/help/faq#107 The FAQ Entry

[jQuery] Re: Open div by URL?

2009-06-10 Thread waseem sabjee
do you mean extract a specific div from an external URL ? if so this will work. $.ajax({ URL : http://www.domain.com/help/faq#107;, success: function(html) { var thediviwant = $(#topnav, html).html(); $(body).prepend(thediviwant); } }); On Wed, Jun 10, 2009 at 4:43 PM, deltaf

[jQuery] Re: Open div by URL?

2009-06-10 Thread Ricardo
There is a method in jQuery made specifically for that: $('#content').load(/help/faq #107); That's all. Notice the white space between the hash. It's not a location hash anymore, but a selector that will filter the output. And the URL has to be in your own site, ajax doesn't work cross-domain.

[jQuery] Re: Open div by URL?

2009-06-10 Thread mkmanning
I think the answers, though informative, have gotten off track. If you want to open a specific DIV based on the hash in the URL, just use: var div = window.location.hash; $(div).show(); You should put the necessary checks to make sure there is in fact a hash in the url, etc. On Jun 10, 3:24 

[jQuery] Re: Open div by URL?

2009-06-10 Thread Ricardo
Oops, you're right. I answered waseem's message without looking at the OP. On Jun 10, 6:00 pm, mkmanning michaell...@gmail.com wrote: I think the answers, though informative, have gotten off track. If you want to open a specific DIV based on the hash in the URL, just use: var div =