yes, I did. But since "this" is the element that I selected (a DIV) it
was of no use. the class I wrote is not a jqeury extension, it's a
separate item. But using the "trick" of storing "this" in an outside
variable did the trick like Ricardo Tomasi wrote.
On 9 Feb., 20:09, SoulRush wrote:
> Did
Thanks! That worked great!
On 9 Feb., 20:09, Ricardo Tomasi wrote:
> just stay aware of the scope:
>
> var oldthis = this;
> this.slide=function(){
> $(this.container_selector_contents).fadeOut(1000, function(){
> oldthis.setContent();
> oldthis.fadeIn(1000)
>
Oh, I thought setContent() was one of his class' methods. Does it make
sense to do something like this.slide=function() {.. on a jQuery
object?
On Feb 9, 5:57 pm, Eric Garside wrote:
> Yea, the scope should be fine. You just have to wrap "this" in "$()"
> when using the reference to the element.
Yea, the scope should be fine. You just have to wrap "this" in "$()"
when using the reference to the element.
On Feb 9, 2:09 pm, SoulRush wrote:
> Did you try with
>
> $(this).setContent();
>
> instead of
>
> this.setContent();
>
> ?
>
> On 9 feb, 14:13, Creativebyte
> wrote:
>
> > Hello group,
Did you try with
$(this).setContent();
instead of
this.setContent();
?
On 9 feb, 14:13, Creativebyte
wrote:
> Hello group,
>
> I got a problem with a JS class I am writing. I got the following
> piece of code:
>
> this.slide=function(){
> $(this.container_selector_contents).f
just stay aware of the scope:
var oldthis = this;
this.slide=function(){
$(this.container_selector_contents).fadeOut(1000, function(){
oldthis.setContent();
oldthis.fadeIn(1000)
});
} ;
On Feb 9, 3:13 pm, Creativebyte
wrote:
> Hello group,
>
> I got a problem
6 matches
Mail list logo