1/* 2 * Plugin Name: Magic Liquidizer Responsive Table 3 * Plugin URI: http://www.innovedesigns.com/wordpress/magic-liquidizer-responsive-table-rwd-you-must-have-wp-plugin/ 4 * Author: Elvin D. 5 * Description: A simple and lightweight plugin that converts HTML table into responsive. After activation, go to Dashboard > Magic Liquidizer Lite > Table. 6 * Version: 2.0.2 7 * Author URI: http://innovedesigns.com/author/esstat17 8 */ 9(function($){$.fn.responsiveTable=function(options){var settings=$.extend({headerSelector:'thead td, thead th, tr th',bodyRowSelector:'tbody tr, tr',rowElement:'<dl></dl>',columnTitleElement:'<dt></dt>',columnValueElement:'<dd></dd>',enable:!0},options);var tableHTML='',display='',titles=[],index=0,jSum=0,row='',dt='',dd='';return this.each(function(o,e){tableHTML=$(this);display=$('<div class="ml-responsive-table ml-responsive-table-'+o+'" />');tableHTML.find(settings.headerSelector).each(function(i,e){titles[i]=$(e).html()});tableHTML.find(settings.bodyRowSelector).each(function(){$(this).children('td').each(function(j){jSum=jSum+j})});tableHTML.find(settings.bodyRowSelector).each(function(i,e){row=$(settings.rowElement);row.addClass('ml-grid ml-clearfix ml-row-'+i);$(this).children('td').each(function(j,d){index=jSum==0?i:j,dt=$(settings.columnTitleElement),dd=$(settings.columnValueElement);dt.addClass('ml-title ml-table');dt.html(titles[index]);dd.addClass('ml-value ml-table');dd.html($(this).html());if($.trim($(this).html())==''){dd.addClass('ml-empty');dt.addClass('ml-empty')} 10row.append(dt).append(dd)});display.append(row)});if(settings.enable){tableHTML.hide();if(tableHTML.attr('id')!==undefined){tableHTML.attr('id','temp-'+tableHTML.attr('id'))} 11$('*',tableHTML).each(function(){if($(this).attr('id')!==undefined){$(this).attr('id','temp-'+$(this).attr('id'))}});tableHTML.after(display)}else{$(".ml-responsive-table").detach();if(tableHTML.attr('id')!==undefined){tableHTML.attr('id',tableHTML.attr('id').replace('temp-',''))} 12$('*',tableHTML).each(function(){var orig_id=$(this).attr('id');if(orig_id!==undefined){var new_id=orig_id.replace('temp-','');$(this).attr('id',new_id)}});tableHTML.show()}})}})(jQuery);(function($){$.fn.MagicLiquidizerTable=function(options){var settings=$.extend({table:'1',breakpoint:'720',whichelement:'table',headerSelector:'thead td, thead th, tr th',bodyRowSelector:'tbody tr, tr',},options);return this.each(function(){function responsiveTableFn(){var viewwidth=$(window).width();if(viewwidth<settings.breakpoint){if(!$('html.rwd-table').length>0){$('html').addClass('rwd-table')} 13if(settings.table=='1'&&!$('.ml-responsive-table').length>0){$(settings.whichelement).responsiveTable({enable:!0,headerSelector:settings.headerSelector,bodyRowSelector:settings.bodyRowSelector,})}}else{if($('html.rwd-table').length>0){$('html').removeClass('rwd-table')} 14if(settings.table=='1'){$(settings.whichelement).responsiveTable({enable:!1})}}} 15$(window).resize(responsiveTableFn).ready(responsiveTableFn)})}}(jQuery))
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.