If you want to send HTML email using the PHP mail(), here is an example.
Continue reading PHP – Send HTML Email
Tag Archives: HTML
HTML – Add Site Icon favicon.ico
Add the following line inside the HTML <head> to add the favicon.
- <link REL=”SHORTCUT ICON” HREF=”http://<domain>/<path to .ico>/favicon.ico”>
Done =)
CSS – Disable Textarea Resize
use the following CSS to disable the textarea resize.
textarea {
resize: none;
}
Done =)
CSS & jQuery – Hide the HTML page until the Javascript & CSS styles are completely loaded
It always takes some times for the browser to apply the CSS styles on the rendering page. Therefore, users may observe a style leap before the page is completely loaded. We could fix this problem by hiding the body anchor until the Javascript and CSS are loaded.
First, set the visibility of the body anchor to hidden. Continue reading CSS & jQuery – Hide the HTML page until the Javascript & CSS styles are completely loaded
CSS – Add scroll bar to div
A scroll bar could be added to a div by applying the overflow property in CSS.
.scrollable {
height: 100px;
overflow-y: scroll;
}
Drupal – Add CSS Attributes to Menu Items
If you want to add customized the HTML attributes such as id and class of the menu items, the Menu attributes module could help.
Download and install the module @ Drupal – Menu attributes Continue reading Drupal – Add CSS Attributes to Menu Items
jQuery – Bind event to newly inserted element
If you have inserted DOM objects into the HTML in $(document).ready(function() {…}). Those binded events will not applied to newly inserted DOM objects. In the following example, a new button is inserted whenever the .btn is clicked. but it is only valid for the first .btn button. Continue reading jQuery – Bind event to newly inserted element
jQuery – Check/Select a radio input
The following jQuery code check/select a radio button.
$('#radio-input-id').attr('checked', 'checked');
Done =)
jQuery – Sliding div Example
There are some jQuery plugins such as jQuery Cycle Plugin which makes website animation simple. The following HTML is a sliding div example without using other plugins. it maybe not good for use but it would be a nice example for beginners to try the power of jQuery. Continue reading jQuery – Sliding div Example
jQuery – Check if a Checkbox is CHECKED
So many “check” in this post title. haha~
You can get the checkbox state by the the following jQuery. Continue reading jQuery – Check if a Checkbox is CHECKED