https://www.dxomark.com/rankings/#smartphones
Script #1
$.each( $( "div.col.deviceName.small-4" ), function( index, item ){ if ( index > 2 ){}else{ console.log( item ); } });
Script #2
var ls = $( "div.col.deviceName.small-4" ); console.log(`size of $(ls.length)`); console.log( ls.length ); $.each( ls, function( index, item ){ if( true )console.log( $( item ).text() + "|" + $( item ).text().toUpperCase().includes("XIAOMI") + "." );}); "";
Script #3
Last working executed on: 20210412_pm015753
var target = "IPHONE"; var ls = $( "div.col.deviceName.small-4" ); console.log(`size of $(ls.length)`); console.log( ls.length ); $.each( ls, function( index, item ){ var isTarget = $( item ).text().toUpperCase().includes( target ); var parentRow = $( item ).parent().parent().parent(); if( isTarget ) {console.log( $( item ).text() + "|" + isTarget + "|" + $( $( item ).siblings(".deviceScore")[0] ).find("span").text() + "." ); $( parentRow ).show(); }else{ $( parentRow ).hide(); } }); "";
Script#4
Last working executed on: 20210701_pm063845
Show only target:
var target = "IPHONE"; var ls = $( "div.col.deviceName.small-8" ); console.log(`size of $(ls.length)`); console.log( ls.length ); $.each( ls, function( index, item ){ var isTarget = $( item ).text().toUpperCase().includes( target ); var parentRow = $( item ).parent().parent().parent(); if( isTarget ) {console.log( $( item ).text() + "|" + isTarget + "|" + $( $( item ).siblings(".deviceScore")[0] ).find("span").text() + "." ); $( parentRow ).show(); }else{ $( parentRow ).hide(); } }); "";
Hide only target:
var target = "SHOWALLPHONE"; var ls = $( "div.col.deviceName.small-8" ); console.log(`size of $(ls.length)`); console.log( ls.length ); $.each( ls, function( index, item ){ var isTarget = $( item ).text().toUpperCase().includes( target ); var parentRow = $( item ).parent().parent().parent(); if( isTarget ) {console.log( $( item ).text() + "|" + isTarget + "|" + $( $( item ).siblings(".deviceScore")[0] ).find("span").text() + "." ); $( parentRow ).hide(); }else{ $( parentRow ).show(); } }); "";
Append column before Launch Price:
$( '<div class="col sort-header custom-small-2">test</div>' ).insertBefore( $( "div.col.launch_price" ) );