Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Tutorials and Tips

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-29-2014, 11:48 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 652,668
Hall of Famer is on a distinguished road
Default

Actually its very easy to add a css class to a GUI component. Assume you have the button object, all you need to do is to add one line of script:

PHP Code:
$button->setClass("btn btn-primary"); 
And its done. Of course since in most of the time the button object is instantiated and added directly to the form container object, you may need to modify 2-3 lines rather than just 1 line. Heres an example, you will need to change this:

PHP Code:
$form->add(new Button("Click to Submit""submit""submit")); 
to the three lines script below:
PHP Code:
$submitButton = new Button("Click to Submit""submit""submit");
$submitButton->setClass("btn btn-primary");
$form->add($submitButton); 
Still, its pretty easy in my eyes. Of course for users who lack php or OOP experience it can be a bit tricky. XD
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
 

Tags
css, html, javascript, jquery, rendering


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't edit my home page anymore? Skaiya Questions and Supports 8 03-30-2014 02:26 PM
jQuery and Mysidia: A struggle IntoRain Questions and Supports 11 02-05-2014 03:58 PM
Jquery one weekend? Tony Other Chat 0 07-30-2011 06:34 PM
Change html and stuff of insite-made page? The Codfin Keeper Questions and Supports 6 01-23-2011 06:32 AM
Javascript/Jquery not being run. [Answered] exactly33 Questions and Supports 5 12-23-2009 11:39 AM


All times are GMT -5. The time now is 03:28 AM.

Currently Active Users: 2192 (0 members and 2192 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636