0.0.6 • Published 11 years ago

sioux-global v0.0.6

Weekly downloads
27
License
-
Repository
-
Last release
11 years ago

sioux-global

The collection of basic features that are important and useful for working with the other parts of the sioux project. It is optional to make it global, but it is recommended. The features listed after, are basically just shorthands to the DOM ones.

var $ = require('sioux-global');
// window.$ = $;

console.log($.isTouchDevice);

$('button')
  .on('tap', function () {
    console.log('tapped!');
  })
  .on('touchleave', function (event) {
    console.log('left!');
  })
  .css('color', 'red')
  .css({
    'border-radius': '5px'
    , 'border': '1px solid red'
  });

$(selectorText, parentElement)

matches the elements with the selectorText, if parentElement defined it will query in it

on(eventName, handler)

adds an event handler to the matched elements

off(eventName, handler)

removes the event handler from the matched elements

css(obj)

pretty much same as in jquery

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago