user3739958 user3739958 - 1 year ago 86
Javascript Question

Jquery this.find() not picking anything up?

I hope you can help. I am trying to set part of a column to a text area.

$('#myListview .list-item').click(function() {

I printed out 'this' which shows all of my HTML however I only want to show a specific part:-

Within the HTML that I have printed out to a text area I want to be able to print the row ID called 'data-roid'.

<div class = "ui-btn-text listview-row" **data-rowid="123456789"**>

So basically my new text are value wuld = '123456789'

sysID = $(;
getId('textarea-sysID').value = JSON.stringify(sysID);

Would really appreciate any help.


Answer Source

Get element by has attribute selector and attribute value by using data() method.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download