Skip to content

Palladium02/photonJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

PhotonJS

How to use

First you have to initialize a new Photon object. The property 'el' is required.

<script>
p = new Photon({
 el: 'yourSelector',
 data: {
  list: ['john doe', 'foo', 'bar']
 },
 methods: {
  'sayHello': () => {
   //your functionality here
  }
 }
});
</script>

Photon currently has three different directives. The p-if and the p-for directive. With the p-if directive you can hide and show an element based on a boolean statement. The p-for directive generates a list from a example element and fills them with the content of the list which was passed in. Lastly the click directive which generates a onclick event which executes the passed method from Photon.methods.

<ul>
 <li p-for="list"></li>
</ul>

About

A simple JS library for dom manipulation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published