Skip to content
Advertisement

Find the element and append value in it using jQuery

I have three <li> inside the <ul> . Now the structure of the html looks like this

JavaScript

inside each li this is the html

JavaScript

So when I click on the chbs-button-style-2 I want to add variable value in the chbs-vehicle-content-price div by using $(this).

this is I where I am stuck

JavaScript

Advertisement

Answer

Not sure why you are doing all of the siblings and other checks, just walk up to a common parent and find the element.

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement