Changeset 1369125
- Timestamp:
- 03/11/2016 11:16:36 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wui-lightbox/trunk/includes/wui_lightbox_functions.php
r1369075 r1369125 21 21 <?php } 22 22 if( get_option('wui_lbs_gallery') == 'true' ){ ?> 23 // $('ul').each(function( index ) { 24 // var wui_lightbox_group_id = Math.floor((Math.random() * 100) + 1); 25 // if($(this).children().children().attr('class') == 'wui_lightbox'){ 26 // $(this).children().children().attr( "data-uk-lightbox","{group:'"+wui_lightbox_group_id+"'}" ); 27 // } 28 // }); 23 29 $('ul').each(function( index ) { 24 30 var wui_lightbox_group_id = Math.floor((Math.random() * 100) + 1); 25 if( $(this).children().children().attr('class') == 'wui_lightbox'){26 $(this).children(). children().attr( "data-uk-lightbox","{group:'"+wui_lightbox_group_id+"'}" );31 if( $(this).children().children().prop("tagName") == 'A' && /\.(?:jpg|jpeg|gif|png)$/i.test($(this).children().children().attr('href'))){ 32 $(this).children().attr( "data-uk-lightbox","{group:'"+wui_lightbox_group_id+"'}" ); 27 33 } 28 34 }); 29 35 $('div').each(function( index ) { 30 36 var wui_lightbox_group_id = Math.floor((Math.random() * 100) + 1); 31 if( $(this).children().children().prop('tagName') == 'IMG' && $(this).children().prop("tagName") == 'A'){37 if( $(this).children().prop("tagName") == 'A' && /\.(?:jpg|jpeg|gif|png)$/i.test($(this).children().attr('href'))){ 32 38 $(this).children().attr( "data-uk-lightbox","{group:'"+wui_lightbox_group_id+"'}" ); 33 39 }
Note: See TracChangeset
for help on using the changeset viewer.