developer

How to force a line break in a loooooong word in a DIV?

Question: ❓❓❓ Okay, this is really confusing me. I have some content inside of a div like so: <div style="background-color: green; width: 200px; height: 300px;"> Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest. </div> However, the content overflows the DIV (as expected) because the ‘word’ is too long. How can I force the browser to ‘break’ the Read more…

By admin, ago
developer

Clear form fields with jQuery

Question: ❓❓❓ I want to clear all input and textarea fields in a form. It works like the following when using an input button with the reset class: $(".reset").bind("click", function() { $("input[type=text], textarea").val(""); }); This will clear all fields on the page, not just the ones from the form. How Read more…

By admin, ago
developer

Fluid width with equally spaced DIVs

Question: ❓❓❓ I have a fluid width container DIV. Within this I have 4 DIVs all 300px x 250px… <div id="container"> <div class="box1"> </div> <div class="box2"> </div> <div class="box3"> </div> <div class="box4"> </div> </div> What I want to happen is box 1 to be floated left, box 4 to be Read more…

By admin, ago
developer

Get checkbox value in jQuery

Question: ❓❓❓ How can I get a checkbox’s value in jQuery? Good Answer: 👌👌👌 To get the value of the Value attribute you can do something like this: $("input[type='checkbox']").val(); Or if you have set a class or id for it, you can: $('#check_id').val(); $('.check_class').val(); However this will return the same Read more…

By admin, ago