<?php switch($this->type) { case 'button': $js = '$( "#buttonWrapp-'.$this->id.' button").button({'.$this->optionsString.'});'; $element = '<button id="'.$this->id.'">'.$this->text.'</button>'; break; case 'submit': $js = '$( "#buttonWrapp-'.$this->id.' input:submit").button({'.$this->optionsString.'});'; $element = '<input id="'.$this->id.'" value="'.$this->text.'" type="submit">'; break; case 'link': $js = '$( "#buttonWrapp-'.$this->id.' a").button({'.$this->optionsString.'});'; $element = '<a id="'.$this->id.'" href="'.$this->anchor.'">'.$this->text.'</a>'; break; default: $js = '$( "#buttonWrapp-'.$this->id.' a").button({'.$this->optionsString.'});'; $element = '<button id="'.$this->id.'">'.$this->text.'</button>'; } ?> <script> $(function() { <?php print $js; ?> }); </script>
<div id="buttonWrapp-<?php print $this->id; ?>"><?php print $element; ?></div>
|