Re: [jQuery] Bug in animate or am I doing something wrong?
I think I found the error... don't know if it's a bug in my styling or an error in jQuery though, perhaps somebody else could shine some light on this. I found out that whenever I use animate the div which is animated inherits the opacity of the parent div, even if the animated div has a different opacity setting. I would suspect that this is a bug since it should not (at least not to my knowledge) overwrite the set opacity setting - please comment on this Regrads Jimmy > Hello everybody. > > I have a div which I am changing size and position for with the animate > function but when the animation is completed the div ends up beeing > semi-transparent. > > > The div has the following css-properties > > #box { > position: absolute; > background: #FF; > top: 200px; > width: 225px; > height: 200px; > border: 10px solid #FF; > text-align: left; > } > > > The animation code > > $('#box').animate({ > 'height': 400, > 'top': 100 > }); > > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Bug in animate or am I doing something wrong?
Hello everybody. I have a div which I am changing size and position for with the animate function but when the animation is completed the div ends up beeing semi-transparent. The div has the following css-properties #box { position: absolute; background: #FF; top: 200px; width: 225px; height: 200px; border: 10px solid #FF; text-align: left; } The animation code $('#box').animate({ 'height': 400, 'top': 100 }); ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Need help with the CSS selector - :not()
Hi again. Thanks for the replies John and Klaus I did not get :not() to work but I finally got it to work using jQuery's .not() function. This is how I finally solved it, thanks to the tips from both John and Klaus --- $('body [EMAIL PROTECTED]' + rel + ']:not([href$=' + src.substring(src.lastIndexOf('/')) +'])').each(function() {}); Regards Jimmy > Hi, maybe you ran into the problem that different browsers return > different values for the href attribute if the value itself (in your > html source) is a relative link. > > If src is something like "/relative/path/to/somewhere" try the following > snippet: > > $('[EMAIL PROTECTED]' + rel + ']:not([EMAIL PROTECTED]' + src > +'])').each(function() { > alert(this.href + '\n' + src); > }); > > I think you can leave out the body selector here, links cannot occur > outside the body anyway. > > Or you can try to use the not function, but this should have the same > result: > > $('[EMAIL PROTECTED]' + rel + ']).not('[EMAIL PROTECTED]' + src > +'])').each(function() { > alert(this.href + '\n' + src); > }); > > > -- Klaus > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Need help with the CSS selector - :not()
Thanks for the reply Klaus Both links matches if I, inside the function, do: if (this.href == src) and when I run the script and watch the output of the alert they also match. I tried your tip just to be sure though but it still doesn't exclude the matching href :-/ Did'nt know that different browsers gave a different href reply in _javascript_ if the links are relative though - thanks for the tip! Regards Jimmy Mogrol schrieb: Hi I'm trying to get all links from the body in a page and in the same time excluding a single element with the matching href attribute using the :not css-selector but it does'nt seem to be working. Is this not supported in the latest jQuery (1.0.1) or is there something wrong with my code? The _expression_ returns all links matching the rel but also returns the one with the matching href. I know I could simply insert a: if (this.href != src) in the function to fix this but for my purposes the best way to do it is directly using jquery. I'd be grateful for advices on this. --- $('body [EMAIL PROTECTED]' + rel + ']:not([EMAIL PROTECTED]' + src +'])').each(function() { alert(this.href + '\n' + src); }); Hi, maybe you ran into the problem that different browsers return different values for the href attribute if the value itself (in your html source) is a relative link. If src is something like "/relative/path/to/somewhere" try the following snippet: $('[EMAIL PROTECTED]' + rel + ']:not([EMAIL PROTECTED]' + src +'])').each(function() { alert(this.href + '\n' + src); }); I think you can leave out the body selector here, links cannot occur outside the body anyway. Or you can try to use the not function, but this should have the same result: $('[EMAIL PROTECTED]' + rel + ']).not('[EMAIL PROTECTED]' + src +'])').each(function() { alert(this.href + '\n' + src); }); -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Need help with the CSS selector - :not()
Hi I'm trying to get all links from the body in a page and in the same time excluding a single element with the matching href attribute using the :not css-selector but it does'nt seem to be working. Is this not supported in the latest jQuery (1.0.1) or is there something wrong with my code? The expression returns all links matching the rel but also returns the one with the matching href. I know I could simply insert a: if (this.href != src) in the function to fix this but for my purposes the best way to do it is directly using jquery. I'd be grateful for advices on this. --- $('body [EMAIL PROTECTED]' + rel + ']:not([EMAIL PROTECTED]' + src +'])').each(function() { alert(this.href + '\n' + src); }); ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/