jQuery Simulate Click and Load content from URL

preview_player
Показать описание
using the hash of a URL we can load certain dynamic content automatically. We can utilize jquery's ability to simulate events.
Рекомендации по теме
Комментарии
Автор

its awesome how you don't use filler words while talking and you know exactly what youre talking about. im still a bit confused about how the underscore prevents the jumping because i'm not sure why the jumping happens, but really good tutorial i enjoyed watching

septimusember
Автор

@restavil Not via a website. If you made a browser plugin you could do this.

optikalefx
Автор

Thanks. Basically an Object in Javascript has no guaranteed order. However, the underscore is considered an alphanumeric character, and forces the javascript object to order alphabetically, which is letters first then numbers. So all the underscored 'words' get alphabetized by the first number. IE making them order numerically. Kind of a hack. But Chrome Dev has stated this is a non issue.

optikalefx
Автор

The hash in the link means that it is linking to an anchor (typically the ID of an A tag). It jumps because the browser is scrolling to place the anchor at the top of the screen.

Placing the underscore (or any string) stops the jumping because the linked anchor doesn't exist, so the browser doesn't scroll. The #google anchor was renamed to #google_. So, the linked #google anchor doesn't exist. However, the jQuery code modifies the #google hash to be #google_, which is a modifiable object.

FailingDarkness
Автор

Great!! Was looking around on the net for an hour on how to do this, thanks!

Lesgo
Автор

@amit2076 Well it's not saving a state per say. But the goal Is to give the page uniquess when JavaScript has manipulated the content

optikalefx
Автор

Thanks a lot! It's simply the best solution which I was searching for?

Viktorres
Автор

Hey man,
thanks for that awesome tutorial! Exactly what I was searching for!

comedyclub
Автор

i love programming it always makes sense!

septimusember
Автор

This was great! Thanks for the clear explanation

P
Автор

@amit2076 You will need to use cookies to save the changes that jquery or any javascript code made to the page.
Or you can use a mysql database to save tha changes that every user of your site do.
I think i helped!!

TillNever
Автор

I don't know if this is asking too much but maybe you're in a generous mood..
I'm doing a PHP fopen on a URL link in order to read the contents of the page and "scrape" off the information I need. Is there a way for Jquery to simulate clicking on all possible links on a page (even within Flash) and then simply record what happens as a result of the click? In this case the onlick fires a javascript function that sends a tracking tag to Omniture via a querystring.
Word. eestavillo at gmail

restavil
Автор

thanks u helped me solve a problem with this vid :P 5*

SycophantFoo
welcome to shbcf.ru