Created
August 25, 2017 11:59
-
-
Save 3014zhangshuo/d82bd9dafb1b697f98d211dfe8bad2f0 to your computer and use it in GitHub Desktop.
简历自动建议系统
This file contains hidden or 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
$('#resume-score').click(function(){ | |
$('#suggestion').html('') //防止多次点击后出现重复提示信息 | |
$('#suggestion').removeClass('hide') | |
$('#suggestion').append('<%= j render :partial => "student/resumes/loading2" %>'); | |
function show(){ | |
var total = $('#clear-s-brackets').html().toString() | |
if (total.match('www') || total.match('http')) { | |
$('#suggestion').append('<li>建议使用编辑器自带的添加链接功能</li>') | |
} | |
var tooMuch = false | |
$('.item-cont-pList').each(function(){ | |
var size = $(this).find('li').length | |
if (size > 8) { | |
tooMuch = true | |
} | |
}); | |
if (tooMuch == true) { | |
$('#suggestion').append('<li>建议一段经历下面的描述不要超过8条</li>') | |
} | |
var tooShort = false | |
var tooLong = false | |
$('#work li').each(function(){ | |
var size = $(this).text().length | |
if (size > 100) { | |
$(this).css( "color", "green" ); | |
tooLong = true | |
} else if (size < 50) { | |
$(this).css( "color", "red" ); | |
tooShort = true | |
} | |
}); | |
$('#exp li').each(function(){ | |
var size = $(this).text().length | |
if (size > 100) { | |
$(this).css( "color", "green" ); | |
tooLong = true | |
} else if (size < 50) { | |
$(this).css( "color", "red" ); | |
tooShort = true | |
} | |
}); | |
if (tooShort == true) { | |
$('#suggestion').append('<li>红色描述过短</li>') | |
} | |
if (tooLong == true) { | |
$('#suggestion').append('<li>绿色描述过长</li>') | |
} | |
var hasEmpty = false | |
$('#resume_white li').each(function(){ | |
var size = $(this).val() | |
if (size == ' ') { | |
hasEmpty = true | |
} | |
}); | |
if (hasEmpty == true) { | |
$('#suggestion').append('<li>可以使用一页纸调节功能</li>') | |
} | |
$('#loading').remove(); | |
} | |
setTimeout(show, 1000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment