Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would like to insert a br after the first UL element I have used both after and insertAfter but it inserts it multiple times. thanks in advance

 <div id="usual1">
<ul class="tabs1">
<li><a href="#Home" class="selected">Home</a></li>
<li><a href="#NewPages" class="">NewPages</a></li>
</ul>
<div id="NewPages" style="display: none;">
</div>
</div>
share|improve this question

closed as off topic by Muhimbi, Alex Angas Jun 2 '11 at 7:14

Questions on SharePoint Stack Exchange are expected to relate to SharePoint within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Although you may use this in SharePoint, it really belongs on StackOverflow.com. You'll get more and better answers there as well. –  Muhimbi Jun 1 '11 at 6:08

1 Answer 1

This will work, but you'll undoubtedly need to tighten the selector. $("ul:first").append("<br/>"); You haven't given enough specifics for this to be the exact *emphasized text*answer, but hopefully it'll give you the idea.

share|improve this answer
    
Thanks marc since there are a lot of ul's on the page that won't work so what i did is added a id=header to the UL like so : <ul class="tabs1" id="header"> then did $("#header").append("<br/>"); but that added br immediately after the UL and i want it at the end of </UL> <div id="usual1"> <ul class="tabs1"> <li><a href="#Home" class="selected">Home</a></li> <li><a href="#NewPages" class="">NewPages</a></li> </ul> <div id="NewPages" style="display: none;"> </div> </div> –  Patrick Jan 14 '11 at 3:26
    
Patrick, I can't seem to reconcile your example markup above with what you are trying to do. Could you add some indication where in the markup you want the <br/>? However, this might be solved better with a CSS margin or the like. –  Marc D Anderson Jan 15 '11 at 5:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.