Hi Im new to OOP javascript. My problem is who can I access object vars
from within a query function?
e.g.
function about(){
this.personSelected="tet";
this.init = init;
this.test = test;
}
function init(about){
$('#dropzone').Droppable({
accept : 'people_image',
hoverclass: 'peopleDropZone',
ondrop: function (drag)
{
alert(this.personSelected);
<--------------------------------------
var timer=1000;
//if(dropObj.personSelected == ""){
//$('#profilePlaceholder').BlindLeft(700);
//}else{
//alert("clean");
//Check if some one has been selected yet
//dropObj.cleanProfile(dropObj.personSelected);
//}
//alert(this.personSelected.StringValue);
alert(about.personSelected);
//set the person who was dragged
about.personSelected = drag.id;
//Create function to attach to timer
var recursiveCall = function(){
switch(drag.id){
case 'peter_image':
$('#peter').BlindRight(700);
$('#profileTitle').html("Peter Gough");
break;
case 'derek_image' :
$('#derek').BlindRight(700);
$('#profileTitle').html("Derek Kenneally");
break;
case 'timmy_image'
:$('#tim').BlindRight(700);
$('#profileTitle').html("Tim Bowler");
break;
case 'mark_image'
:$('#mark').BlindRight(700);
$('#profileTitle').html("Mark");
break;
default: $('#people_1').BlindRight(700);
}
};
setTimeout(recursiveCall,timer); */
},
fit: true
});
}
var aboutObj = new about();
aboutObj.init();
How can i access the about obj from within the ondrop function?
Thanx
--
____________________________________________________________
Timothy M Bowler BSc(Hons) MSc MIEE | Senior Programmer
Or Multimedia Ltd
Savoy Hill House
Savoy Hill
London
WC2R 0BL
(T) 020 7240 8556
(F) 020 7240 8557
http://www.or-media.com
____________________________________________________________
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/