uczę się właśnie jQuery i próbowałem zmienić kolor danej listy uporządkowanej za pomocą jQuery. Zgodnie z tym co napisano w artykule polecanym na oficjalnej stronie jquery:
Cytat
With jQuery, we do it like this:
$(document).ready(function() {
$("#orderedlist").addClass("red");
});
The starterkit provides a stylesheet with a class "red" that simply adds a red background. Therefore, when you reload the page in your browser, you should see that the first ordered list has a red background. The second list is not modified.
$(document).ready(function() {
$("#orderedlist").addClass("red");
});
The starterkit provides a stylesheet with a class "red" that simply adds a red background. Therefore, when you reload the page in your browser, you should see that the first ordered list has a red background. The second list is not modified.
Dodaje to do swojego kodu i nie działa, kolor tła $orderedlist nie zmienia się na czerwony, dlaczego:(?
Mój kod:
Dodam, że inne skrypty jQuery mi działają.