Sweet!
 
thanks man
 
Dave

  _____  

From: Gustavo Salomé [mailto:gustavon...@gmail.com] 
Sent: June-04-09 1:58 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Add <DIV> magically?


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


2009/6/4 Dave Maharaj :: WidePixels.com <d...@widepixels.com>


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