Last active
July 28, 2018 00:21
-
-
Save devbug/cec1f7326a14e7faaf047945c732408f to your computer and use it in GitHub Desktop.
Mnet PRODUCE48 홈페이지에 소소하게 '내 픽만 보기' 추가 (개발자 콘솔에 붙여넣기 ㄱㄱ)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myPicksOnly = function() { | |
var isMyPicksOnly = $('#myPick').is(":checked") || false; | |
if (!isMyPicksOnly) { | |
$('.sorting a.selected').click(); | |
return; | |
} | |
var html = ''; | |
picks = $('.tranieeList li.selected'); | |
if (picks.length > 0) { | |
html += '<ul>'; | |
picks.each(function(){ | |
html += $(this).wrap('<p/>').parent().html(); | |
}); | |
html += '</ul>'; | |
} | |
$('.tranieeList').html(html); | |
}; | |
$('.sorting').append('<div class="ckEtc"><label for="myPick"><input id="myPick" name="myPick" onclick="javascript:myPicksOnly();" type="checkbox">내 픽만 보기</label></div>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment