var $fields = $('#div'); // not a good idea for an id
var firstDL = $fields.find('dl:first-child')[0];
$(XXX).each(function(){
if ( $(this).prev('dl').is( firstDL ) )
blowUp();
});
or
if ( $fields.index( $(this.prev('dl')[0] ) == 0 )
or
if ( $(this.prev('dl')[0] == $('#div dl:first')[0]
Anybody knows?
Thanks to Dave Methvin, it runs. I didn't try Kean's solution, Dave's
was simpler.
And I have one more question:
HTML:
...something...
...something...
...
...
...
...
JS:
if(previous dl is first dl){ ...} else { ... } - how can I write the
condition? (e.g. I have this condition in sec
Thanks to Dave Methvin, it runs. I didn't try Kean's solution, because
David's was simpler, but thanks too.
And I have one more question:
...something...
...something...
...
...
...
JS:
if(previous dl == first dl) - how can I check if previous of 'this dl'
is the first 'dl', e.g. I ha
>
> ...something...
>
>
> ...something... TO MOVE
>
How about this?
$("#to_move").parents("dl:first").prev().find("dd").append($
("#to_move"));
I am moving
If i am inserting into any , regardless where my is
in (ie. it can be in the third , fifth etc)
var idx = 2; //place with other numbers
$("#moving").insertAfter($("#moving").parent('#notDiv').find("li:nth-
child("+idx+") b");
If i am inserting after the previous , regardless
6 matches
Mail list logo