Modul: jQuery

Hier könnt ihr alle Fragen zu SpiderBasic austauschen.
Benutzeravatar
Kiffi
Beiträge: 10620
Registriert: 08.09.2004 08:21
Wohnort: Amphibios 9

Modul: jQuery

Beitrag von Kiffi »

Hallo,

hier ist ein Modul, das den Umgang mit jQuery erleichtert:

https://github.com/spiderbytes/jQuery

Beispiel:

Code: Alles auswählen

IncludeFile "jQuery.sbi"

UseModule jQuery
  
  Define Table, TableRow, TableCell
  Define rowCounter, cellCounter
  
  Table = Element("<table />") ; Create a table element
  
  SetAttribute(Table, "border", "1") ; set the border attribute
  
  SetCSS(Table, "background-color", "white") ; set the background-color to white
  
  SetCSS(Table, "position", "absolute") ; set the position...
  SetCSS(Table, "top", "100px")
  SetCSS(Table, "left", "100px")
  
  For rowCounter = 0 To 9 ; let's create 10 table rows
    
    TableRow = Element("<tr />") ; create a table row element
    
    For cellCounter = 0 To 9 ; let's create 10 table cells per row
      
      TableCell = Element("<td />") ; create a table cell element
      
      SetText(TableCell, "Row " + rowCounter + " / Cell " + cellCounter) ; write some text into the cell
      
      Append(TableRow, TableCell) ; append the new cell element to the current row element
      
    Next
    
    Append(Table, TableRow) ; append the new row element to the table element
    
  Next
  
  Body = Element("Body") ; get the body element
  
  Append(Body, Table) ; and append the table element to the body element
  
UnuseModule jQuery
Grüße ... Peter
Hygge
Benutzeravatar
dige
Beiträge: 1179
Registriert: 08.09.2004 08:53

Re: Modul: jQuery

Beitrag von dige »

Super! Vielen Dank - langsam kommen wir Pb2Web näher :-)
"Papa, mein Wecker funktioniert nicht! Der weckert immer zu früh."
Antworten