$('#programs').before('<div class="loading" id="loading_programs"></div>');

2009/6/4 Dave Maharaj :: WidePixels.com <[email protected]>

>  Can jQuery add a div in a specific location?
>
> I currently have :
>
> <li>
>           <div class="loading" id="loading_programs"></div>
>           <div id="programs">
>             <dl class="entry" >
>               <dt>Programs</dt>
>               <dd class="skills">
>                 <?php foreach ($user['Program'] as $program):
>       echo $program['name'] . ', ';
>         endforeach; ?>
>               </dd>
>             </dl>
>           </div>
>           </li>
>
> But rather than hard coding the <div class="loading"
> id="loading_programs"></div>.loading div into every spot its needed. The
> page structure is pretty simple with about 5 blocks of code in sucesion like
> the one above for various elements on a page.
>
> So in this example can i add before div id="programs">?
>
> thanks,
>
> Dave
>



-- 
Gustavo Salome Silva

Reply via email to