Turning Learners Into Developers
Codekilla
CODEKILLA
back to course
Lesson 41 / 8747%
HTML / DOM Manipulation4/12

data() — jQuery Data Store

Attach any data to an element (not just strings).

// where does the new node land? before · prepend · append · after.before('X')<div#target>… target content …</div>.prepend('X')<div#target>… target content …</div>.append('X')<div#target>… target content …</div>.after('X')<div#target>… target content …</div>Click a step to see where the new node lands.
Visual explanation diagram · click steps to walk through it

This lesson is Pro only.

Unlock every premium lesson and module — Pro from ₹299 / month (or ₹999 / year, saves ~₹2,589).

Sign in to unlock
// feedback.matters()
Did this lesson help you?