我正在努力将 hoverintent jQuery 集成到我的网站中。我已将其插入我的代码,但我从 Chrome 调试器收到错误消息。错误读取Uncaught TypeError: Cannot use in operator to search for display in undefined
。我不确定出了什么问题。这是我的代码。
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js">
<script type="text/javascript" src="http://cherne.net/brian/resources
/jquery.hoverIntent.js"></script>
</script>
<script type="text/javascript" >
$(document).ready(function() {
var config = {
sensitivity: 3,
interval: 200,
over: $(this).animate({opacity: 1}, 500),
timeout: 500,
out: $(this).animate({opacity: 0}, 500)
};
var config_1 = {
sensitivity: 3,
interval: 200,
over: $(this).animate({opacity: 1}, 500),
timeout: 500,
out: $(this).animate({opacity: 0}, 500)
};
$('#form1').hoverIntent(config);
$('#form2').hoverIntent(config_1);
});
</script>
这是html代码
<div id="div1">
<form action="" id="form1" method="post">
<textarea id="inputbox1" name="what_i_do" maxlength="160" value=""><?php echo
$profile_data['what_i_do']; ?></textarea>
<input type="submit" id="button1" value="Edit">
</form>
</div>
<div id="div2">
<form action="" id="form2" method="post">
<textarea id="inputbox2" name="fait_accompli" maxlength="160" value=""><?php echo
$profile_data['fait_accompli']; ?></textarea>
<input type="submit" id="button2" value="Edit">
</form>
</div>