Shadowing Posted July 7, 2012 Share Posted July 7, 2012 (edited) Hey guys i came accross a issue that i dont understand the resultsI"m using data() to store a array in $('div#game_announcements_array').data("announcements",game_announcements_array); and then im also grabing it var game_announcements_array = $('div#game_announcements_array').data("announcements"); i am grabing from the array using $('div.game_announcements').html(game_announcements_array[0]); then im removing the first element in the array var game_announcements_array = game_announcements_array.shift(); for some reason this is updating data() with the new array lol. how is that possible? Edited July 7, 2012 by Shadowing Link to comment Share on other sites More sharing options...
Shadowing Posted July 7, 2012 Author Share Posted July 7, 2012 ahh nevermind it must because i have it running a loop and the variable doesnt reset so i dont even need to use data() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now