我正在使用jquery version 1.3.2
。我面临一个奇怪的问题。在 IE9 中我的应用程序工作正常,但在 IE8 中此功能不起作用
jQuery('.mutulafriends').live('click',function(){});
我只是在这个函数里面放了一个警报但没有工作,似乎它没有识别click
。在控制台中我可以看到一个错误
SCRIPT87: Invalid argument.
jquery-1.3.2.min.js, line 12 character 12949
当我将此功能与警报一起使用时
jQuery('.mutulafriends').click(function(){
alert("");
});
完美运行。但也显示错误:
SCRIPT87: Invalid argument.
jquery-1.3.2.min.js, line 12 character 12949
似乎错误不影响click
. 我知道对于 jquery 版本 1.3.2live('change'
不起作用,但为什么live('clck'
不起作用?任何想法,请帮忙。提前致谢。这是我的 HTML。它可能太长了,但我认为它可能会有所帮助。
<div class="component-list-wrapper">
<?php if(is_array($result) && count(array_filter($result)) > 0) {
foreach($result as $record) {
?>
<div class="eliment-component-list eliment-divider">
<div class="user-profile-img-holder">
<img alt="Profile image"
src=<?php if(isset($record['ProfileImg'])){echo $img_url.md5($record['ProfileID'])."/default/".$record['ProfileImg'];}else{echo $this->config->item('ivory_img_path')."/thumb-img.png";} ?> />
</div>
<div class="user-des-container">
<div class="user-des-left">
<div class="namecontainer">
<label class="darkcolour-large"><?php echo $record['FirstName']; if($record['PrivacySettingFriend']){echo " ".$record['LastName'];} ?></label> <label
class="lblsub"><?php echo $record['StateName'].', '.$record['CityName']; ?></label>
</div>
<div class="friendcontainer">
<label img_url="<?php echo $img_url; ?>" req_type="recieved" friend_id="<?php echo $record['ProfileID']; ?>" class="darkcolour margine-top20 mutulafriends btndialogMutualFriends"><?php if(!isset($record['CommonFriendCount'])){echo "0 Friends in Common";}else if($record['CommonFriendCount']!=1){echo $record['CommonFriendCount']." Friends in Common";}else{echo $record['CommonFriendCount']." Friend in Common";} ?></label>
</div>
</div>
<div class="user-des-right">
<div class="user-des-right-inner">
<img width="13" height="13" class="btnDialogDelete request_del_dialog_open_but" req_type="recieved" prof_friend_id="<?php echo $record['ProfileFriendID']; ?>"
src="<?php echo $this->config->item('ivory_img_path'); ?>close_button.png"
alt="Profile image">
<div class="button-wrapper">
<input type="button" class="btnRequest btn-white-small request_accept_dialog_open_but" name="" prof_friend_id="<?php echo $record['ProfileFriendID']; ?>"
tabindex="123456" value="Accept">
</div>
<div class="button-wrapper">
<input type="button" class="btnDialogAssign btn-grey-small request_decline_dialog_open_but" prof_friend_id="<?php echo $record['ProfileFriendID']; ?>"
name="" tabindex="123456" value="Decline">
</div>
</div>
</div>
</div>
</div>
<?php }
} else {?>
<div class="no-records-found">No records found</div>
<?php } ?>
</div>