Skip to content

gzlboy/appframework

 
 

Repository files navigation

jqMobi - a HTML5 targeted Javascript Framework

jqMobi is a Javascript framework targeted at HTML5 browsers with a blazingly fast query selector library that supports W3C queries.

It is comprised of three parts.

  1. jqMobi - query selector library

  2. jqUi - UI/UX library for mobile applications in a webkit browser or W8/WP8. Please see the Kitchen Sink folder for a demo

  3. jqPlugins - plugins for mobile applications in a webkit browser or W8/WP8.

About jqMobi

We started talking to our development community and asked them what they wanted. The key features were

  1. Fast performance

  2. Small code base

  3. Only needs to support a small subset of commands

Rather then try to improve another library, we found it easier to build one from the ground up, but recognizing the groundwork other frameworks laid out. By doing this, we were able to identify simple ways to increase speed performance. Our tests repeatedly showed we were 2x or more faster at single operation commands.

All the libraries performed similar when operations were performed on a group of elements.

Using jqMobi

To use jqMobi, include the script in your html file. You can use the pre-built minified version.

<script src="jq.mobi.min.js"></script>

This will then create two objects that you can work with. It will NOT override a pre-existing $ object.

$("#main")
jq("#main")

Query Selector

W3C spec'ed queries are supported. What this means is you can do the following

$("input[type='text']")

You can NOT do the following, as it's not supported by the browsers.

$("input:text")

In some functions, an additional selector can be used. This can be a string, array, or a jqMobi object. We currently do not support functions

Syntax:

Basic call

$("#id").hide()

You can specify a Dom element, selector, list of nodes, or HTML string.

$("span").bind("click",function(){console.log("clicked");}); // -> find all span elements and attach a click event

You can pass in an HTML string and it will create the object for you.

var myDiv=$("<div id='foo'>") //Creates a div object and returns it