@Thanks Ricardo, this is actually very on the topic ;o)
I do not understand what is beiong argued here? If anything ? My
assertions are certainly not "horrible lies"? I knew this speed
difference , (and Daniel should know by now ...)
We just need jQ "next" to sort out the lack of explanation in
The fact that $('#foo').find('.someclass'); is faster than $('#foo
.someclass'); right now is completely irrelevant to reasonable arguments.
While it may be faster now, it is highly likely that future work to the
selector engine will soon reverse that statement and make the former
faster than t
Hello.
I have a situation where I have grabbed a couple of images off a page
and want to insert them again into an unordered list. Grabbing the
images was no problem but I don't know what to write when inserting
them again.
The code below does not result in the images being inserted again,
instea
Might want to try something like this instead:
$(".gallery img").each(function()
{
$('#bild_spel div ul').append('');
});
haven't tested it but I believe it's correct :)
On Mar 30, 11:48 am, smurkas wrote:
> Hello.
>
> I have a situation where I have grabbed a couple of images off a page
I don't think this is a bug, if you go ahead and remove an element it
is quite normal to assume that you would want the binding on that
element to be removed as well in order to save ressources. In most
cases a removed element is not going to come back, otherwise it's
easier to just move it out of
For some reason your answer doesn't show on here. You might have mail
me directly, anyway if you want to insert the element straight away
instead of creating a new image element maybe the fact that you are
mixing string variable and an object in your appen() might cause the
problem.
In your code
Hi All,
I am using remove() to remove html from a li. I have a hover and click
event attached to the li. This is a circular carousel and i want to
remove the li which goes out of the visible area. For this, i get the
non-visible li, get its html, add it to the back of the list and
remove this li.
Thanks for the tip, that works :D. However it seems rather roundabout
to create new img-elements when the elements i grab are img-elements.
I have continued to experiment and this works too:
var img = $(".gallery img");
$(".gallery").remove();
$(img).each(function() {
$("#bild_spel div ul
> I believe this is a bug. Is there a workaround/fix tet?
It's intended as a feature.
Most jQuery newcomers must find out the hard way that .remove() is
really more like a "destroy" or "delete" method.
If you .remove() an element you're signalling that you don't intend to
use it again.
Fortunate
Hi,
>From 1.3.1 to 1.3.2 sibling selector does not work anymore:
http://jquery.nodnod.net/cases/277
$(document).ready(function() {
module("Sibling in jquery-1.3.2");
test("Sibling filter", function() {
var length = jQuery("li.selected").siblings("li").length;
equals(length, 2, "sibling fi
Looking at the 1.4 roadmap and xLazyLoader seems like I can stop
looking into the problems stated above by either waiting for 1.4 or
integrating xLazyLoader into my plugin as it seems to do exactly what
is causing me problems.
On Mar 29, 12:12 pm, Gilles wrote:
> I have tried the new Function ap
Hi John,
I think this is a problem with the sibling optimization I made. It
fails when the searched element is in the checkSet.
In dirNode and dirNodeCheck the following if:
if ( sibDir && elem.nodeType === 1 ) {
elem.sizcache = doneName;
Actually, I think this one was already fixed.
Can you test it real quick?
http://code.jquery.com/nightlies/jquery-2009-03-26.js
--John
On Mon, Mar 30, 2009 at 8:24 AM, yodza wrote:
>
> Hi,
>
> From 1.3.1 to 1.3.2 sibling selector does not work anymore:
> http://jquery.nodnod.net/cases/277
>
var img = $(".gallery img");
$(img).each(function() {
$("#bild_spel div ul").append( $('').append(this) );
});
~Daniel Friesen (Dantman, Nadir-Seen-Fire)
Gilles wrote:
> For some reason your answer doesn't show on here. You might have mail
> me directly, anyway if you want to insert the e
Okay...
I have a predetermined photo position and size/width on my layout and
I want when they click the photo for it to overlay or blockout all
areas but the revealed photo spot.
Once that occurs, they can plug a photo onto the page and drag it
around behind the overlay so that all is exposed is
Thanks Fabio !
It works back after removing those lines from:
http://code.jquery.com/nightlies/jquery-2009-03-26.js
*** jquery-2009-03-26.js.orig 2009-03-30 19:43:31.0 +0200
--- jquery-2009-03-26.js2009-03-30 19:45:50.0 +0200
***
*** 1459,1468
f
Hi all,
I'm in the process of migrating a site from 1.2.7 to 1.3.2.
So far, I just ran into a bug in webkit browsers that forced me to rewrite
"expr1, expr2, ... exprN" selectors into loops (I suppose you're aware of
this one).
I also have trouble with attaching event handlers to dynamically creat
This sounds like a good candidate for event delegation. I believe that
jQuery.fn.live implements this for bubbling DOM events:
http://docs.jquery.com/Events/live#typefn.
On Mon, Mar 30, 2009 at 9:04 AM, Már Örlygsson wrote:
>
> > I believe this is a bug. Is there a workaround/fix tet?
>
> It's in
On Sun, Mar 29, 2009 at 7:12 AM, Gilles wrote:
> Also could you explain what $.getScript(scripts[n++],
> arguments.callee); actually does? I am not sure of what
> arguments.callee refers to.
It is the function itself. It was put in to the language to make
recursion of an anonymous function p
That is correct and to add to the solution... I'd recommend caching the
results of the ul selector and leaving out the 'div' part unless it is
necessary.
var $img = $('.gallery img'), $ul = $('#bild_spel ul');
$img.each(function() {
$ul.append(this);
});
--
Brandon Aaron
On Mon, Mar 30, 2009
If I'm understanding the problem correctly, you'll want this:
$(".gallery img").clone().appendTo("#bild_spel div ul").wrap("");
(remove the .clone() if you want to move the img elements, as well)
--John
On Mon, Mar 30, 2009 at 6:48 AM, smurkas wrote:
>
> Hello.
>
> I have a situation where
There is a bug open on window dimensions in jQuery 1.3.x... Unfortunately it
looks like we have a gap in unit tests that allowed this regression to
occur. It looks like it happened in r5985. It will be fixed for the 1.3.3
release but I'm unsure when that release will happen right now. I should be
a
Thanks for the quick answer Brandon.
And yes, I can live with a nightly build though, as you can imagine, the
client is like not understanding what's taking so long (go explain the joy
of version migration to a client!). Any timeframe? I could also live with an
ugly workaround until it's done if yo
You could pull in the window logic from 1.2.6 (
http://dev.jquery.com/browser/tags/1.2.6/src/core.js#L1338 ) into the 1.3.2
release ( http://dev.jquery.com/browser/tags/1.3.2/src/dimensions.js#L25 ).
--
Brandon Aaron
On Mon, Mar 30, 2009 at 3:48 PM, Julian Aubourg wrote:
> Thanks for the quick an
Thank you so much for that John, not only does it works now but I have
learn few things as well :)
Like in other posts made here, thank you all for your help.
http://codeserenity.com/jquery/scriptless/demoX.html
-- working on FF3, IE7 and Safari 4 for far :)
Thanks again, I can now develop more
The docs say all that is needed:
"By default, if no context is specified, $() looks for DOM elements
within the context of the current HTML document. If you do specify a
context, such as a DOM element or jQuery object, the expression will
be matched against the contents of that context."
The spe
Thanks, Steve. Appreciate the compliment and advice.
I do see a need for it, which is why I did it. Let's just hope the
people who do have a say also see a need for it. Something like this
is hard to have as 'just a plugin' because if it is ever used for
general purpose plugin authoring, then it
Btw, Daniel, I have changed the API to accomodate this.
jQuery.plugin.add('name', func || objectOfFuncs), will now add a
static plugin and can be called like jQuery.name() or
jQuery.name().method1();
Static methods can be applied also by giving a static keyword with the
function name:
jQuery.pl
On Mar 30, 11:12 pm, Ricardo wrote:
> The docs say all that is needed:
>
> "By default, if no context is specified, $() looks for DOM elements
> within the context of the current HTML document. If you do specify a
> context, such as a DOM element or jQuery object, the expression will
> be match
29 matches
Mail list logo