- Author had a File in an Envato Bundle
- Sold between 250 000 and 1 000 000 dollars
- Author was Featured
- Item was Featured
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- India
For example, I have two copies of a page; both of which contain same jquery code. Something like:
$(document).ready(function () {
var flag = 0;
$('#anchor').click(function () {
flag = 1;
});
})
When I am on Page1 and clicked #anchor, the flag value changed to 1. Now if I return to Page2, I need the flag value to get modified, depending upon the action performed on Page 1; and vice versa. i.e. Modifying a variable on one page should update itself globally for all pages. How can this be done?
Any help is most appreciated. Thanks in advance
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Item was Featured
- Author had a Free File of the Month
- Author was Featured
- Bought between 10 and 49 items
- Europe
- Exclusive Author
- Has been a member for 4-5 years
- Referred between 100 and 199 users
Use a cookie(use and not eat ;))
Use a cookie(use and not eat ;))
+1 
- Author had a File in an Envato Bundle
- Sold between 250 000 and 1 000 000 dollars
- Author was Featured
- Item was Featured
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- India
Use a cookie(use and not eat ;))
Thanks Mark. I will try with that. 
- Attended a Community Meetup
- Author had a Free File of the Month
- Author was Featured
- Blog Editor
- Bought between 50 and 99 items
- Contributed a Tutorial to a Tuts+ Site
- Envato Staff
- Exclusive Author
- Featured in a Magazine
Or – if it isn’t sensitive data, you can pass it through the query string.
But yeah – setting a cookie is probably the easiest method.
- Author had a File in an Envato Bundle
- Sold between 250 000 and 1 000 000 dollars
- Author was Featured
- Item was Featured
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- India
Or – if it isn’t sensitive data, you can pass it through the query string. But yeah – setting a cookie is probably the easiest method.
Thanks Jeff. I had this done successfully with cookies and jquery cookie plugin. 
