By Callum Macrae
- Enhance your jQuery code by utilizing item constructors and prototypes
- Send a couple of Ajax requests with no need to load the total jQuery library
Quick preview of Learning from jQuery PDF
AppendChild: // the opposite direction, utilizing innerHTML: rfile. physique. innerHTML += 'text'; // the right kind method: var newElement = rfile. createElement('strong'); newElement. setAttribute('class', 'test'); newElement. innerHTML = 'text'; rfile. physique. appendChild(newElement); utilizing rfile. createElement is longer and extra complex than adjusting the . innerHTML, however it is way extra effective. The . setAttribute approach is reasonably descriptive; it units the category characteristic to check (we have used the .