Jump to content
php.lv forumi
  • 0

jQuery - Pievienot <div></div> arpus <ul> ja i


mbitenieks

Question

7 answers to this question

Recommended Posts

  • 0

Paldies par tik aatru atbildi!

 

Google Chrome izmet Uncaught SyntaxError: Unexpected token ILLEGAL

 

Divaini jo taa nevajadzeetu buut. bet tomeer palaizhot lapaa. nestradaa!

 

 

$j(document).ready(function(){
  $j('#circle-slider').each(function(){
     if($j(this).children().length>1){
         $j(this).after($j('<div class="single-blog-nav"> <div id="next2"></div> <div id="prev2"></div> <div class="clear"></div> </div>'));
     }
  });​
});

 

 

Paldies!

Edited by mbitenieks
Link to comment
Share on other sites

  • 0

Intereses pēc paskatījos, vai nav kāds cits variants

$('ul').has('li + li').after('<div>hello</div>');

lēnāks, bet ātrāks par each() tikai, ja ir vismaz 10 vai vairāk ul lapā

 

$('ul').has('li:not(:only-child)').after('<div>hello</div>');

vispār lēns

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...