Ask Your Question

Manipulate the DOM with jQuery - Exercise 2

asked 2020-05-01 13:21:38 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.


Buta kérdés lesz, de nem találok megoldást... Bemásolom az az objektumot:

let additionalBlock = { title: "Added with javascript", text: "This block was added using JavaScript's jQuery library. How awesome!" }; OK.

De az objektumban lévő tartalmakra (title-text) hogyan tudok hivatkozni?

$('title').append("és gondolom ide kellene a title tartalma ");

Próbálkoztam sokféleképp .title, :title, {title}, ${title}, []

Vagy teljesen rossz a megközelítésem? Köszi

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2020-05-01 13:40:12 -0500

Okay, I founded out.... $('title').append(additionalBlock['title']);

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-05-01 13:21:38 -0500

Seen: 15 times

Last updated: May 01