Page 4 of 5

Centering a control?

Posted: Fri Feb 01, 2013 12:17 am
by PeterKrogh

Is this still supported in the latest version of Tiggzi?

I understand that this snippet should center the image "mobileimage24" on page load:

$('.mobileimage_24').css('margin', 'auto');
$('.mobileimage_24').css('align', 'center');

...but I'm not sure where to put that code. I've tried adding in 'Set HTML attribute,' 'Run JavaScript,' and 'Set Property' from the attached drop down but nothing seems to work. Image


Centering a control?

Posted: Fri Feb 01, 2013 12:31 am
by maxkatz

On page load.

http://docs.tiggzi.com/documentation/...

Tiggzi is an app builder. You can do anything that's supported by the browser.


Centering a control?

Posted: Fri Feb 01, 2013 12:39 am
by PeterKrogh

Max,
I understand this happens on page load. If you look at my image above, you'll see I have 'Load' already selected. I do not know which 'Select Action' item to choose within which I will put the .css strings.
Thank you,
/Peter


Centering a control?

Posted: Fri Feb 01, 2013 1:00 am
by maxkatz

Sorry, the action is Run JavaScript.


Centering a control?

Posted: Wed Feb 13, 2013 3:43 am
by John Hajewski

I tried this code method exactly and my image is still left justified. My image is mobileimage_6...


Centering a control?

Posted: Wed Feb 13, 2013 6:40 am
by Maryna Brodina

Hello! This code should work:

Tiggzi('mobileimage_6').parent().css('margin', 'auto');
Tiggzi('mobileimage_6').parent().css('align', 'center');


Centering a control?

Posted: Wed Feb 13, 2013 4:35 pm
by PeterKrogh

We were never able to get inline statements to work. We had to create a custom CSS file, drop it in the 'CSS' directory, then define the images we wanted centered there. Make sure you use the _div name or it won't work.

E.g.:

div.mobileimagef_6_div {
text-align: center;
width: 100%;
}


Centering a control?

Posted: Tue Mar 12, 2013 9:58 am
by Riaan Bezuidenhout

Hi After recent update update below script not working anymore

Tiggzi('mobileimage_64').css('margin', 'auto');
Tiggzi('mobileimage_64').css('align', 'center');

http://project.tiggzi.com/mobile-fram...


Centering a control?

Posted: Tue Mar 12, 2013 10:37 am
by Maryna Brodina

Hello! This post should help https://getsatisfaction.com/tiggzi/to...


Centering a control?

Posted: Tue Mar 12, 2013 10:46 am
by Riaan Bezuidenhout

Thanx worked