Most Powerful Open Source ERP

Guideline Use Of JavaScript Id Attribute Is Not Allowed

Duplicate ids will beak a page.
  • Last Update:2017-05-09
  • Version:001
  • Language:en

Use Of Id Attribute Is Not Allowed

"id" attributes should not be used in HTML element, because when working with gadgets (reusable compontents), duplicate Ids will break an application. For CSS selection, always prefer class attributes. For other HTML manipulation need, javascript should be used.

Good Example:

<style> .my_app > ul > li { ... } </style>
<div class="my_app">My App...</div>

Bad Example:

<style> #my_app > ul > li { ... } </style>
<div id="my_app">My App...</div>