I have made list:
<ul>
<li id="one"></li>
</ul>
And then in jQuery I do:
$("#one").text("one");
However it is not changing, also I have tried using .val()
but it didn't help.
Why it happens and how to change the li text?
There may be one of the problem you have
1) You did not imported js files properly
2)You might not write the code in ready function
Write your code in ready function and import jQuery related js files.
$( document ).ready(function() {
$("#one").text("one");
});
http://jsfiddle.net/zBxTm/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With