Having problem on HTML5 and CSS3 with Internet Explorer ? The Modernizr library could help you to tackle the problem. It checks the HTML5 and CSS3 features supported by the browser and developers could determine them by checking the classes of the <html> tag.
Download Modernizr and create the following index.html .
Continue reading Modernizr – Tackle the HTML5 and CSS3 problems in old browsers for frontend programming →
A good example says it all.
function foo(a, b) {
a = typeof a !== 'undefined' ? a : 42;
b = typeof b !== 'undefined' ? b : 'default_b';
// Do whatever you want
}
Done =)
Reference: StackOverflow – How do I make a default value for a parameter to a javascript function
Recently i have an client who wants to embeded the FormSite form in the a Drupal 6 website. But after i insert the embedded code in the node body with Full HTML or PHP Code filters. Nothing is shown. For example, if i enter the following code in the node body .
Continue reading Drupal – Embed inline Javascript in node body →
The following example shows you how to get the anchor part of the URL in Javascript .
Continue reading Javascript – Get the Anchor Part of the URL →
Yesterday we talked about playing audio file in HTML5 .
HTML5 – Play sound/music with <audio> tag @ 1
We can also take control of it using Javascript . Here is another example with a toggle link which can play and stop the music. jQuery is needed as well as the following Javascript file.
Continue reading HTML5 – Play sound/music with <audio> tag @ 2 →
I want to style the form elements such as radio button , checkbox or selection list . G o o g l e shows me a very good tutorial written by Ryan Fait .
Las Vegas Web Design – Checkboxes, Radio Buttons, Select Lists, Custom HTML Form Elements
In the above tutorial, those form elements will be replaced by a span element . It works great. Only 1 minor problem which is those span elements could not align well. So i made some change on the CSS . Here is my example.
Continue reading Styling checkbox and radio button with CSS and Javascript →
I found a useful Javascript countdown clock written by Robert Hashemian and modified by Munsifali Rashid . Download the countdown.js @ JavaScript Countdown/Count-up Timer/Clock/Ticker for Web Pages and try the following example.
Continue reading Javascript – Countdown Clock →
Create the following HTML and you could figure out how to generate random number by Javascript . Continue reading Javascript – Generate Random Number →
The following Javascript example shows you how to manipulate the Date object. Continue reading Javascript – Get Current Date and Time →
The following functions help you to pad a string in Javascript . Continue reading Javascript – Left/Right Pad a String →
Posts navigation
Dream BIG and go for it =)