Tuesday 19 August 2014

trancate string in CSS if it goes out of the parent content?

.myClass 
{
    overflow: hidden;         // hide the string if it is overflow.
    text-overflow: ellipsis;  //put three dot after trancate string.
}

Thursday 14 August 2014

Inline switch case in SQL

CASE ISNULL(upub.SharedBy,0) //ISNULL -if value is null then convert to 0.
       WHEN 0  // true when upub.SharedBy=0
            THEN pub.PublicationDate
            ELSE  upub.DateUpdated
 END

Tuesday 5 August 2014

Features of Jquery

Features of Jquery 
1. One can easily provide effects and can do animations. 
2. Applying / Changing CSS. 
3. Cool plugins. 
4. Ajax support 
5. DOM selection events 
6. Event Handling 


and many more other feature provide by jquery.

difference between e.preventDefault(); and return false

The difference is that preventDefault will only prevent the default event action to occur, i.e. a page redirect on a link click, a form submission, etc. and return false will also stop the event flow.