DotDragnet
May 24, 2012, 09:52:55 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: follow us on twitter @dotdragnet
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: jQuery  (Read 153 times)
SLEE
Hero Member
*****
Posts: 824



View Profile WWW Awards
« on: February 01, 2012, 07:46:05 PM »

HI all,

I am creating a page that has some dynamic content being loaded in.
I need to run a script that changes the way a select box looks and behaves when the page loads and also when the new content is loaded in which is done when clicking a button.

What is the best way to run the script? I thought about using .live() or the new .on() so it would run on the new content but I am not sure how to code it.

As it calls the script when the page loads how can i also make it look for new content?

Logged

SLEE - still the most confusing ddner...

Follow me on Twitter
SLEE
Hero Member
*****
Posts: 824



View Profile WWW Awards
« Reply #1 on: February 01, 2012, 11:16:36 PM »

figured it out myself. i simply ran the script on the current content div and then for any div created.
Logged

SLEE - still the most confusing ddner...

Follow me on Twitter
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!