Jeremy Lin 林書豪

[youtube &w=640&h=360] [youtube &w=480&h=360] 9 Lessons Jeremy Lin Can Teach Us Before We Go To Work Monday Morning http://www.forbes.com/sites/ericjackson/2012/02/11/9-lessons-jeremy-lin-can-teach-us-before-we-go-to-work-monday-morning/ 在週一上班前,林書豪教我們的九堂課 http://www.inside.com.tw/2012/02/12/9-lessons-jeremy-lin-can-teach-us-before-we-go-to-work-monday-morning

February 12, 2012 · 1 min · birdchan

The "select all" checkbox to select all checkboxes

Below is what you need for a “select all” checkbox to toggle the rest of the checkboxes. Below assumes your checkboxes all have the name “my_chkboxes[]”. $('#my_select_all').click(function(){ $("input[name='my_chkboxes[]']").each(function (index, el) { if ($('#my_select_all').is(':checked')) { $(el).attr('checked', 'checked'); }else{ $(el).attr('checked', false); } }); });

February 11, 2012 · 1 min · birdchan

Select the last option of a drop down

Say you have a list of drop down select options and you want to pick the last option by default when the page loads, with jquery this is how to do it. $(document).ready(function() { $('#my_select option:last-child').attr('selected', 'selected'); }); Below is how you get the the value of the first, last, and the nth options. var option_first = $('#my_select option:first-child').val(); var option_last = $('#my_select option:last-child').val(); var option_nth = $('#my_select option:nth-child(0)').val();

February 10, 2012 · 1 min · birdchan

Jeditable – Edit In Place Plugin For jQuery

I want to recommend this awesome plugin to you called Jeditable. Imagine you have a text field you want to let your users make changes to and then save it. Won’t you need a text field and a save button? How nice if the user can click on some text and edit it from there. Um… it’s hard to describe what that looks like, you will have to try out the demo yourself! ...

February 8, 2012 · 1 min · birdchan

To disable form fields in jquery

I don’t think the current jquery syntax to enable/disable form elements is intuitive. But here it is: $("#my_element").attr("disabled", "disabled"); // to disable $("#my_element").removeAttr("disabled"); // to enable

February 4, 2012 · 1 min · birdchan

Steve Jobs - 2007 iPhone Presentation

[youtube &w=640&h=360] I don’t know what brought me to this video, but I am just amazed that things which I do on my iphone everyday were a major breakthrough in 2007. In just 5 years of time, iphone has become part of our lives. It’s very hard to imagine if I don’t have google map on my phone these days, would I print out the driving directions instead? Um… ...

February 3, 2012 · 1 min · birdchan

Tooltip

If you are looking for nice tooltip libraries, I recommend trying qTip2. It’s a jquery plugin. And it’s got most of the pop-up tooltip features you can imagine. I personally like this feature, that you can assign different behaviors (by different actions) to the same element. See below: // Create our first tooltip $('.selector').qtip({ content: 'Mouse entered', show: { event: 'mouseenter', solo: true // Only show one tooltip at a time } }) // Remove the previous tooltips data .removeData('qtip') // Create our second tooltip .qtip({ content: 'Click', show: { event: 'click', solo: true // Only show one tooltip at a time } }); With the above code, you can have a specified mouseover preview tooltip, and a detailed view upon a mouse click. Very handy! ...

February 1, 2012 · 1 min · birdchan

Patriot Black PBO Core Box Office

Recently I went on newegg and bought this “Patriot Black PBO Core Box Office All-in-one 1080p Full HD Media Player with HDMI PCMPBO25”. (such a long name…) Simply put, a media box that streams to your TV with hdmi. Just in case I didn’t do justice, you got to take a look at its supported video format list: - MPEG-1: MPG/MPEG/DAT support up to 1080p - MPEG-2: MPG/MPEG/VOB/ISO/IFO/TS/TP/M2TS up to 1080p - MPEG-4: MP4/AVI/MOV support up to 1080p - DivX 3/4/5/6/7, Xvid: AVI/MKV/ support up to 1080p - H.264, AVC: TS/AVI/MKV/MOV/M2TS support up to 1080p - WMV 9: WMV support up to 1080p - FLV support 352x288 - ISO image - Real Video 8/9/10: RM/RMVB support up to 720 ...

January 31, 2012 · 4 min · birdchan

rounded corners

An ordinary div Row 1 A div with rounded corners Row 2 The second div looks so much more fun and professional at the same time! As it turns out, all you need is one or two extra lines in order to add these rounded corners. See code below: #my_div { border-radius: 15px; } If you want more fine-tuning, try the following. The first parameter is the horizontal radius of the rounded corner, the second the vertical. ...

January 31, 2012 · 1 min · birdchan

Leading Change Together

[youtube &w=640&h=360] How do you lead a healthy team dynamic? In this episode, Bill Hybels and Jim Mellado revisit a classic interview with Carly Fiorina at The Global Leadership Summit. During the interview, Bill asked her about the dynamics within her board. Bill and Jim then identify the dynamics involved in healthy teams. ...

January 28, 2012 · 1 min · birdchan