Page 1 of 1

Need some help with CSS (I think...)

Posted: Tue Oct 22, 2013 8:57 am
by Ram

Dear Appery,

Using drag and drop lib, as part of playing around to learn it, i'm dragging a label on a button and once dropped the button change its text see this example

this is the code i'm using on page load:
code
$(function() {
$( "#Main_lbl_drag" ).draggable();
$( "#Main_btn_play" ).droppable({
drop: function( event, ui ) {
$( this )
.text('Dropped on me!');
Appery('lbl_drag').hide();
}
});
});

Appery('lbl_drag').addClass('ui-widget-content');
/code

as you can see from the screen capture is that once dropped, the button is getting narrower... any thoughts on how i just change the button text without affecting its other properties?

Thanks much in advance!
Best,
R.


Need some help with CSS (I think...)

Posted: Tue Oct 22, 2013 9:31 am
by Ram

after some thought, what is the best way to read the component's CSS style and store it, then apply the saved style to the component back again?


Need some help with CSS (I think...)

Posted: Tue Oct 22, 2013 9:47 am
by Maryna Brodina

Hello Ram! We're working on it. I'll update.


Need some help with CSS (I think...)

Posted: Tue Oct 22, 2013 9:48 am
by Ram

THANK YOU!


Need some help with CSS (I think...)

Posted: Tue Oct 22, 2013 11:05 am
by Maryna Brodina

Hi, instead pre$( this ).text('Dropped on me!');/pre use pre$( this ).find(".ui-btn-text").text('Dropped on me!');/pre


Need some help with CSS (I think...)

Posted: Tue Oct 22, 2013 11:20 am
by Ram

Youre AWESOME!