My attempt at a seemingly simple task is proving to be quite confusing and isn't functioning as expected...
The goal is clear - upon document load using $(document).ready(), I want to target all input elements with the attribute type="text" and apply the css class "textbox" to them...
<script type="text/javascript">
$(document).ready(function () {
var textboxes = $(":input [type = 'text']");
textboxes.each().addClass("textbox");
});
</script>
Any insights into why this code isn't working as intended?...
EDIT:
Well, it seems there's still much for me to grasp about jquery-isms... but I'm starting to appreciate jQuery more :) its simplicity really does work wonders.