I have a div that I load in with the jQuery 'load'. Is it possible to update a parent variable from within the loaded div?
i.e. parent var - var testvar = 55
and from with in the loaded div I set testvar = 33
now when the loaded div is closed, testvar is now = 33?
edit - example code: (I actually have two loads deep)
$(".bgBtn").click(function(){
$('#dialogLoad').show().load('../dialog/backgroundPicker.php');
})
inside the loaded #dialogLoad div:
var test = 44;
$(".newBgBtn").click(function(){
$('#bgs').load('../dialog/backgroundPicker2.php');
})
inside loaded #bgs div:
$(".button").click(function(){
test = 33;
})
Now the original var test is == 33