there is a div with a class designation of:
<div class="box info-box">
I am getting a section of code using AJAX, how can I replace this part using a response and jquery's replacewith method?
jQuery('.box info-box').replaceWith(data.tooltip);
doesn't seem to work
1 Answer 1
When you want to target one element that has two or more classes, you use no space and a second period, like jQuery('.box.info-box') or if you don't need both classes to be present, you can just do jQuery('.box') or jQuery('.info-box')
I suggest posting questions like this on the general Stack Exchange page, as it's not specific to Magento.