0

so, I have a script like this

<script>
$(document).ready(function() {
   $('#lista').load('gifs/1.php').fadeTo( "slow" , 1);
});
</script>

<script src="arqs/main.js"></script>
<ul id="lista"></ul>

main.js:

$(document).ready(function() {
   var DOMarr=$('#lista li').map(function(){return this;});
   var clip = new ZeroClipboard(DOMarr); 
})

the problem is, zeroclipboard is not "injecting" the flash file when I use .load(), if I use php include it works normally but when I switch to load it does that :( does someone knows a workaround?

I'll need to use load to switch the list, and I'd like zeroclipboard to allow copying from the new list

1 Answers1

0

.load is an asychronous call so .ready may be executed before. Make sure the list is loaded before doing the ZeroClipboard call.

Stefan Ticu
  • 2,093
  • 1
  • 12
  • 21