Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

List Button

Hi,

Don't know if this is possible or not! I have a list to which I am appending list items which include a button using javascript; I would like the button to remove the list item. If I click the button on the list as is it stands it returns the text in all the buttons 'XXX' is it possible tie the button to each item and get a handle to the current item?

Tiggr('loadlis').append(
$('').append(
$('a rel="nofollow"').append(
$('span').attr('class', 'loadlist').append(A)).append('/span/a

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

List Button

The list looks like:

Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

List Button

Hi Joe,

Sorry for the delay. If all the components (including button) that were created by using JavaScript are in the same container then you can delete the whole container on button click. For example:
codefunction onDeleteButtonClick () {
$(this).parent().remove();
}/code

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

List Button

Katya, your ***** star that's exactly what I wanted. I need to do some more jquery study! One question after another! How would I float the button to the right of the Listview?

Thanks,
Joe

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

List Button

Hello! For button set

codefloat: right;/code

and for entire div where you have text and button (not sure what you have there span, a or div) set next style:

codedisplay: block;
clear: both;/code

Basically these sort of questions are not part of our support, it should be coded by you.

Return to “Issues”