function jquerymobile_template_examples in jQuery Mobile module 7.2
Link theme.
New attribute options can be passed into any call to theme_link, l() or url() to enable jQuery Mobile related features
With links you have two options for enabling support for jQuery Mobile
1. Add your desired attributes to the "$options" array in the l() or url() functions 2. Add a set of jQuery Mobile specific array options and the module will process and add the options automatically. See below for an example
See also
http://api.drupal.org/api/drupal/core--includes--common.inc/function/l/8
File
- ./
jquerymobile.api.php, line 73 - Lists new API functions, hooks and Form API options for jQuery Mobile
Code
function jquerymobile_template_examples() {
$output = '';
$options = array();
$options['jquerymobile'] = array(
// Render the link as a button. Probably the most important option listed
// here since the rest are dependent on it.
'button' => TRUE,
// For details on button options, see the Form API Extensions example.
'corners' => TRUE,
'icon' => 'gear',
'icon_position' => 'top',
'icon_shadow' => TRUE,
'inline' => FALSE,
'shadow' => FALSE,
'swatch' => 'a',
);
$output .= l(t('Button Link'), '<front>', $options);
return $output;
}