Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [inne]Jak go wykorzystać na czas wykonywania się skryptu Canvasloader
silverwind
post
Post #1





Grupa: Zarejestrowani
Postów: 80
Pomógł: 0
Dołączył: 8.02.2013

Ostrzeżenie: (0%)
-----


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";
Go to the top of the page
+Quote Post
werdan
post
Post #2





Grupa: Zarejestrowani
Postów: 354
Pomógł: 100
Dołączył: 14.11.2013
Skąd: Płock

Ostrzeżenie: (0%)
-----


  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
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.12.2025 - 00:11