我想在jsfiddle中做一些表面上很簡單的事情,但它不起作用。基本上,我有一個類「我」的h1 html標籤和一個類「poo」的按鈕。第一次點擊的作品和我的CSS顏色改變,但第二次點擊不起作用?第二個jQuery按鈕點擊不發射
$(".poo").click(function(e){
e.preventDefault();
$(".me").css("color","green");
var haha = $("<button>Click Me!!!</button>");
$(this).after(haha);
$(haha).addClass("changer");
$(this).hide();
});
$(".changer").click(function(e){
e.preventDefault();
$(".me").css("color","black");
$(this).hide();
});
鏈接到小提琴? – 2015-02-08 05:23:27
我正在創建的新按鈕。 http://jsfiddle.net/edwinkohlbrenner/0yodg7gb/ – Kohl 2015-02-08 05:25:20