jLim CSS (API)
  • JavaScript

jLim CSS is een jLim module en bevat CSS gerelateerde functies.

Functies

  • .addClass( value )
  • .removeClass( value )
  • .hasClass( value )
  • .style( style, [value] )
    // as getter
    $('p').style('backgroundColor');
    
    // can also use the dashed name instead of camel case
    $('p').style('background-color');
    
    // as setter
    $('p').style('background-color', '#CCCCCC');
    
    // as setter for multiple styles
    $('p').style({
    	'color': '#333333',
    	'font-weight': 'bold',
    	'text-transform': 'capitalize'
    });

    Let op: de style() methode gebruikt de JavaScript style attribuut en dus niet getComputedStyle (of currentStyle) methode. Hier een overzicht van de beschikbare stijlen:
    http://kompoos.nl/manuals/javascript/javascript-style-attributes.html

  • $.toCamelCase( str )

Gerelateerde artikelen

Nog geen reacties

Stuur je reactie

  • RSS
  • LinkedIn
  • Twitter