Git Product home page Git Product logo

jhtml's Introduction

jHmtl is a jQuery plugin for parsing jHtml.

jHtml uses the json format as markup.

 [
  "div",
    {"class":"holder"},[
      "p",{"id":"example"},"hello"
    ]
 ]

jHtml is based on a set of three.

  1. String which represents the tag name
  2. Object which specifies the attributes of the tag ex. (class,id,src...)
  3. Array which represents the innerHtml of the element ex. (child nodes,text..)
[
	"form",{},[
			"input" ,{"list":"browsers", "name":"browser"},[],
			"datalist", {"id":"browsers"},[
			  "option",{ "value":"Internet Explorer"},[],
			  "option",{ "value":"Chrome"},[],
			  "option",{ "value":"Safari"},[],
			  "option",{ "value":"Firefox"},[],
			  "option",{ "value":"Opera"},[]
			],
			"button",{"id":"submit"},"submit"
	]
]

jHtml helps you write one page applications. It lets you have javaScript objects that represent parts of your UI, and you can store them is your applications javaScript, or on your server in a json file.

It allows you to write your markup in a proven data exchange format, and lets you avoid having to write logic for the logic-less parts of your page.

jHtml also comes with a modified micro templating language that is a variant of John Resig's micro templating (http://ejohn.org/blog/javascript-micro-templating/) and evandvlad's variant https://github.com/evandvlad/tmpl/

$.jHtml.template("<p>{{=user.name}}</p>", "user")({name:"joe"})

jhtml's People

Contributors

shidel-dev avatar

Watchers

James Cloos avatar  avatar Joe_Sky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.