2011-05-26 127 views
-3
<html> 
<head> 
<script type="text/javascript"> 
var oauth = chrome.extension.getBackgroundPage().oauth; 
</script> 
<style type="text/css"> 
#note 
{ 
display:none; 
} 
</style> 
<script src="Task.js" type="text/javascript"></script> 
<script src="Taskhandle.js" type="text/javascript"></script> 
<script src="jquery.js" type="text/javascript"></script> 
<title>TaskMan</title> 
</head> 
<body> 
<input type="text" id="title"><input type="text" id="note"> 
<a href="" id="make" onclick="maketask()">+</a> <a href="" id="anote">N</a> 
<script type="text/javascript"> 
window.onload=function(){ 
$('#anote').click(function() { 
$('#note').show(); 
}); 
} 
</script> 
</body> 
</html> 

當我在chrome中運行此代碼時,輸​​入會閃爍。我需要修復。jquery show()閃爍

+0

我想你得給我們的代碼task.js – Hogan 2011-05-26 18:01:41

回答

0

你必須阻止鏈接的默認值(這是重新加載頁面):

$('#anote').click(function (E) { 
    E.preventdefault(); 
    $('#note').show(); 
}); 
+0

這並沒有幫助。現在它甚至不閃爍。 – jbills 2011-05-26 18:04:18

+0

@jbills - 是不是你想要的 - 因爲它不閃爍? – Hogan 2011-05-26 18:05:43

+0

我已修復它。 – jbills 2011-05-26 18:07:32