Page 2 of 2

change UI element based on service data

Posted: Sun Sep 14, 2014 11:11 am
by Shawn

hi maryna

I wanted do something similar ie apply a class to a particular row of the grid.

So i have many grid rows and I want to add an animation effect to the row
that's been clicked ... here's the code ...

Appery("booking_grid").addClass("animated bounceOutLeft") ;

This of course bounces all the rows. I wanted to bounce only the row which
is clicked.


change UI element based on service data

Posted: Mon Sep 15, 2014 2:29 am
by Yurii Orishchuk

Hi Shawn,

You code should be based on the element that's you clicked on.

So try this:

pre

//Note you should replace "booking_grid" with your table component name.
var currentTable = jQuery(this).closest('[name="booking_grid"]');

//Apply class to the current table.
currentTable.addClass("animated bounceOutLeft");

/pre

Regards.


change UI element based on service data

Posted: Mon Sep 15, 2014 9:11 am
by Shawn

hi yurii

that worked perfectly thanks !

rgds
shawn


change UI element based on service data

Posted: Tue Jan 13, 2015 5:09 am
by juricin

Hi, similar topic and stuck.

I am mapping from storage to a label within a grid cell. I'd like to click on the grid cell which will map something different from storage and grid cell background change color.

thanks in advance, ante