Using .load() function for multiple divs help!
Well basically, I'm trying to use the function once which is .load() and fetch my content from there,
then after that I'd like to seperate the class's or div's I'll be using such as <div id="test1">This content will show in the external website</div>
But I'm having trouble doing that, I've used multiple lines just to load the same page and take small bits of content out and it doesn't work well together as some load's results will be different compared to the others.
Heres my code:
- $('#". $Server['ServiceName'] ."').fadeOut('slow', function(){ $('#". $Server['ServiceName'] ."').load('./includes/serversinfo.php #servers #". $Server['ServiceName'] ."', function(){ $('#". $Server['ServiceName'] ."').fadeIn('slow'); }); });
- $('#". $Server['ServiceName'] ." .Hostname').fadeOut('slow', function(){ $('#". $Server['ServiceName'] ." .Hostname').load('./includes/serversinfo.php #servers #". $Server['ServiceName'] ." .Hostname', function(){ $('#". $Server['ServiceName'] ." .Hostname').fadeIn('slow'); }); });
- #$Array[] = "$('#". $Server['ServiceName'] ." .Map').fadeOut('slow', function(){ $('#". $Server['ServiceName'] ." .Map').load('./includes/serversinfo.php #servers #". $Server['ServiceName'] ." .Map', function(){ $('#". $Server['ServiceName'] ." .Map').fadeIn('slow'); }); });";
- $('#". $Server['ServiceName'] ." .Game').fadeOut('slow', function(){ $('#". $Server['ServiceName'] ." .Game').load('./includes/serversinfo.php #servers #". $Server['ServiceName'] ." .Game', function(){ $('#". $Server['ServiceName'] ." .Game').fadeIn('slow'); }); });
- $('#". $Server['ServiceName'] ." .Players').fadeOut('slow', function(){ $('#". $Server['ServiceName'] ." .Players').load('./includes/serversinfo.php #servers #". $Server['ServiceName'] ." .Players', function(){ $('#". $Server['ServiceName'] ." .Players').fadeIn('slow'); }); });
- $('#". $Server['ServiceName'] ." .Secure').fadeOut('slow', function(){ $('#". $Server['ServiceName'] ." .Secure').load('./includes/serversinfo.php #servers #". $Server['ServiceName'] ." .Secure', function(){ $('#". $Server['ServiceName'] ." .Secure').fadeIn('slow'); }); });
- $('#". $Server['ServiceName'] ." .Alive').fadeOut('slow', function(){ $('#". $Server['ServiceName'] ." .Alive').load('./includes/serversinfo.php #servers #". $Server['ServiceName'] ." .Alive', function(){ $('#". $Server['ServiceName'] ." .Alive').fadeIn('slow'); }); });
- $('.generated').fadeOut('slow', function(){ $('.generated').load('./includes/serversinfo.php .generated', function(){ $('.generated').fadeIn('slow') }); });
thanks!