i have a jquery function that creates a dialog box from a regular javascript function for every element selected . one of the options i want to implement is to add buttons to the dialog box. these buttons would have the felxibility of having any function assigned to them.
my problem is how to access the box in which the buttons are created on an onclick event or so of the button itself
here is how i create the dialog box:
$('.box').dialogbox({ buttons: { 'click': function () {
$(self).css({background:'red',border:'2px solid black'})
}, } });
in this case i used $(self)
to access the box itself knowing it isnt the right way. but that's the part i need to fix.
self by the way is declared as a private variable for the function dialogbox which is invloked by the $.dialogbox
jquery function in this fashion :
newBox = new dialogbox ( content)
ps. i apologize about not probably being more clear . please ask me questions if u need more info
thank you