Page 1 of 1

List Button

Posted: Thu Mar 28, 2013 5:57 pm
by Joe Bohen

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


List Button

Posted: Thu Mar 28, 2013 5:58 pm
by Joe Bohen

The list looks like:

Image


List Button

Posted: Thu Mar 28, 2013 9:19 pm
by Kateryna Grynko

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


List Button

Posted: Thu Mar 28, 2013 10:32 pm
by Joe Bohen

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


List Button

Posted: Fri Mar 29, 2013 8:47 am
by Maryna Brodina

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.