Can select an element, please help.
Hi Guys,
First of all, I'm sorry, I'm not very familiar with jQuery (only Basics).
I'm doing a Price Count for my website and I'm stuck, because I can't select the element I need.
The problem is no matter what I'm trying but I can't get the title (or HTML inside the div) to display it in the textarea. I would like to retrieve the text inside the element, so to avoid adding extra tags to html.
- <div class="medium-6 columns title" title="titulo">Titulo</div>
When I create this
- var product = $(this).closest('div').find('.title').attr('title');
I also tryed
- var product = $(this).closest('.title').html();
- var product = $(this).closest('.title').text();
And others.
I keep on getting
- undefined
Can someone tell me why?