我对 jquery 很陌生,这是我需要帮助的:使用 jquery 来查看选择器是否拉出了任何 div,找到特定于示例页面的 div。查看第一个条件是否为假,如果是则重定向到示例页面。谢谢你的帮助!
jQuery部分代码:“
$('.assessment-start').click(function () {
$('#startAssessmentDialog').empty();
//block
$('#startAssessmentDialog').block(_blockUISettings);
//block
var link = $('#startAssessmentDialog').attr('link');
AjaxUtil.Services.PageProxy.SendData(link, GLOBAL._HTTPVerbs.GET, {},
function (data) {
var $data = $(data);
$('#startAssessmentDialog').html($data.find('#surveyContainer'));
$('div[name*="*"]').val('*');</script>
// hide the unmapped capability areas
$("#unmappedCapabilityAreas").hide();
// unblocking
$('#startAssessmentDialog').unblock();
// unblocking
},
function (exception) {
AjaxUtil.DefaultExceptionHandler(exception);
$('#startAssessmentDialog').unblock();
}
);
"
html代码:
<div link="/Survey/details/@Global.CGSs[Model.CGSVersionID.Value].SelfAssessmentSurveyResourceID/@Model.ResourceID" id="startAssessmentDialog" class="noDisplay">
</div>