[pmwiki-users] jquery mobile and skins

Petko Yotov 5ko at 5ko.fr
Mon Sep 17 19:36:06 CDT 2012


Carlos AB writes:
> I'm trying to figure it out, if it is possible to use wiki styles to put  
> jquery mobile related attributes inside some tags.
>
> I'll understand if it is not possible, I'm  
> almost sure it is not completly possible.

I am almost sure nothing is completely impossible. :-)

> SDVA($WikiStyleAttr,array(
>  'data-corners' => 'tag1,tag2',
>  'data-icon' => 'tag1,tag2,tag3',
> ));

Use something like this:

  $WikiStyleAttr['data-corners'] = 'span|a|ul|ol';
  $WikiStyleAttr['data-icon'] = 'li|div|p';

Then, this in a wiki page works:

* test %list data-corners=false%
* testtest %item data-icon=home%
* test %data-corners=true% [[Cookbook/]] %%
>>data-icon=home<<
go home!
>><<

This will work for WikiStyles,  that  is anything applied with  %wikistyle%  
or >>divwikistyle<< but not with simple or advanced tables, or (:div2:) blocks  
where you apply attributes directly and not via WikiStyles, and until  
version 2.2.42, dashes are not allowed in direct attributes. We may change  
this.

Also try to understand how wikistyles are applied, why we have

   %list stuff% in the first item, applied to the whole list <ul> or <ol>
   %item stuff% applied to a list line (item) <li>
   %p stuff% applied to a paragraph <p>

Petko




More information about the pmwiki-users mailing list