Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [inne]Jak go wykorzystać na czas wykonywania się skryptu Canvasloader
Forum PHP.pl > Forum > Przedszkole
silverwind
Po kliknięciu w przycisk chce by pojawił canvasloader na czas wykonywania skryptu. Jak to dobrze po depnąć pod zdarzenie.

$(document).ready(function(){
$("#1").click(function(){
$("#Wynik1").show('slow','cl');
});
});

var cl = new CanvasLoader('canvasloader-container');
cl.setColor('#19610e'); // default is '#000000'
cl.setDiameter(85); // default is 40
cl.setRange(1.2); // default is 1.3
cl.setFPS(30); // default is 24
cl.show(); // Hidden by default

// This bit is only for positioning - not necessary
var loaderObj = document.getElementById("canvasLoader");
loaderObj.style.position = "absolute";
loaderObj.style["top"] = cl.getDiameter() * -0.5 + "px";
loaderObj.style["left"] = cl.getDiameter() * -0.5 + "px";
werdan
  1.  
  2. var cl = new CanvasLoader('canvasloader-container');
  3. cl.setColor('#19610e'); // default is '#000000'
  4. cl.setDiameter(85); // default is 40
  5. cl.setRange(1.2); // default is 1.3
  6. cl.setFPS(30); // default is 24
  7. //cl.show(); // Hidden by default
  8.  
  9. // This bit is only for positioning - not necessary
  10. var loaderObj = document.getElementById("canvasLoader");
  11. loaderObj.style.position = "absolute";
  12. loaderObj.style["top"] = cl.getDiameter() * -0.5 + "px";
  13. loaderObj.style["left"] = cl.getDiameter() * -0.5 + "px";
  14.  
  15.  
  16. $(document).ready(function(){
  17. $("#1").click(function(){
  18. cl.show();
  19. });
  20. });
  21.  
  22.  


Pozniej poprzez
  1. cl.hide();
mozesz go schowac
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.