A small lightweight jquery like utility
<script type="text/javascript" src="http://codotronix.github.io/codelib/barix/v1.0.1/barix.min.js"></script>
bx(function () { /* Document is ready */ })- Shorthand for window.onload / document.readybx('selector')orBarix.select(selector)- Selects the elements matching the (css style) String "selector"bx('...').elems- Returns an array of selected elements. (... = selector)bx('...').attr("attrName")- Returns the value of the given attribute-name [for the 1st element only]bx('...').attr("key","value")- Attribues can be passed as aJSONobject or a single (key,value) pairbx('...').css("styleName")- Returns the value of the given style [for the 1st element only]bx('...').css("key","value")- Style can be passed as aJSONobject or a single (key,value) pairbx('...').addClass("class1 class2")- Adds the class(es) to the selected elements. (... = selector)bx('...').removeClass("class1 class2")- Removes the class(es)..removeClass()removes all classesbx('...').hasClass("class1 class2")- Returnstrueif all class(es) are present, else falsebx('...').each(function(index){...})- Do something for each selected element.indexis passed in each callbackbx('...').html("... HTML Content ...")- Adds/Overwrites HTML inside selected elementsbx('...').append("... HTML Content ...")- Appends HTML inside selected elementsbx('...').remove()- Removes selected element from DOMbx('...').text("... Some Text...")- Adds/Overwrites texts to the selected elementsbx('...').appendText("... Some Text...")- Appends texts to the selected elementsbx('...').on('event', callbackFunction)- Adding Event Listeners / Binding eventsbx('...').on('event', '...', callbackFunction)- Dynamic/Late binding of events and eventsHandlersbx('...').trigger('eventName')- Triggers the given event on the selected elementsBarix.addFunc("funcName", theFunction)- Adds custom function to Barix, which can be called asbx(...).funcName()