Wiki ⇒ v10 Developer's manual ⇒ Poodle Javascript ⇒ CPG Dragonfly™ CMS
Wikiv10 Developer's manual ⇒ Poodle Javascript

14. 2: Poodle Javascript Parent


Warning: This page is under development!

Glossary

	Poodle.$D = document
	Poodle.$B = document.body
	Poodle.$Q() = querySelector
	element.$A() = element.appendChild()

querySelector

	Poodle.$Q('css') = Document.querySelectorAll('css')
	Poodle.$Q('css',1) = Document.querySelector('css')

	element.$Q('li') =  then only elements inside the element are returned

	Poodle.$Q('.tree li:first-child') = returns any first li element with PARENT class .tree

	Poodle.$Q('.tree li:first-child') returns all first li childs

	Poodle.$Q('.tree/> li:first-child') returns only one child of each class

	Poodle.$Q('.tree/> li:first-child',1) returns only the first one

	Poodle.$('coppermine_categories').$Q('li') traversal from a specific node only
	Poodle.$Q('#coppermine_categories li') same as above

	Poodle.$Q() is similar to jQuery()

Event handling

element.on('click',function(event){console.dir(event);});
You may also concatenate methods.
element
	.on('click',function(event){console.dir(event);})
	.on('touchstart',function(event){console.dir(event);})
	.on('focus',function(event){console.dir(event);})
;
or like
element.on('click touchstart focus',function(event){console.dir(event);});

Created: Saturday, January 12, 2013 (01:09:30) by NanoCaiordo
Updated: Tuesday, July 12, 2016 (23:41:25) by DJ Maze