Monday 8 July 2013

Cross Browser CSS

Import css_browser_selector.js in your head section
  • Internet Explorer - yellow
  • Internet Explorer 7 - orange
  • Gecko Engine on Windows (Firefox, Mozilla, Camino) - red
  • Gecko Engine on Linux (Firefox, Mozilla, Camino) - pink
  • Gecko Engine on Other OS (Firefox, Mozilla, Camino) - gray
  • Opera - green
  • Konqueror - blue
  • Safari - black
  • Chrome - cyan

Example

<html>
 <head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
    <script src="css_browser_selector.js"></script>
<style type="text/css">
.ie .example {
  background-color: yellow
}
.ie7 .example {
  background-color: orange
}
.gecko .example {
  background-color: gray
}
.win.gecko .example {
  background-color: red
}
.linux.gecko .example {
  background-color: pink
}
.opera .example {
  background-color: green
}
.konqueror .example {
  background-color: blue
}
.webkit .example {
  background-color: black
}
.example {
  width: 100px;
  height: 100px;
}
.no_js { display: block }
.has_js { display: none }
.js .no_js { display: none }
.js .has_js { display: block }
</style>


 </head>
 <body>
    <p class="example"> Hi Test </p>
 </body>
</html>
Read More

Friday 14 June 2013

Find Mime Type Of a file in java

import java.io.File;

import javax.activation.MimetypesFileTypeMap;


public class TestMimeType {
public static void main(String[] args) {
 String fileName = "C://bunny.mp4";
 MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap();

 // only by file name
 String mimeType = mimeTypesMap.getContentType(fileName);

 // or by actual File instance
 File file = new File(fileName);
 mimeType = mimeTypesMap.getContentType(file);
 
 System.out.println(mimeType);
}
}


Read More

Thursday 6 June 2013

Iterate Java Map Through Javascript

for (var i = 0, keys = Object.keys(a_hashmap), ii = keys.length; i < ii; i++) 
{
       console.log('key : ' + keys[i] + ' val : ' + a_hashmap[keys[i]]);
}
Read More

Thursday 30 May 2013

Read Only Checkbox Jquery

<input type="checkbox" checked="true" onclick="return false"/>
Read More

Wednesday 29 May 2013

Iterate Java Map Using Jquery

 $.each(data., function(key, value) {
                             alert(key);
           });
Read More

Tuesday 16 April 2013

Multiple Select Box onselect/onclick Jquery Event


Attaches a change event to the select that gets the text for each selected option and writes them in the div. It then triggers the event for the initial text draw.

!DOCTYPE html>
<html>
<head>
  <style>
  div { color:red; }
  </style>
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
  <select name="garden" multiple="multiple">
 
    <option>Flowers</option>
    <option selected="selected">Shrubs</option>
    <option>Trees</option>
    <option selected="selected">Bushes</option>
 
    <option>Grass</option>
    <option>Dirt</option>
  </select>
  <div></div>
<script>
$("select").change(function () {
  var str = "";
  $("select option:selected").each(function () {
        str += $(this).text() + " ";
      });
  $("div").text(str);
})
.trigger('change');
</script>
 
</body>
</html>
Read More

Thursday 11 April 2013

Length of class


var n = $("#id").length;
Read More

Multiple Checkbox Select/Deselect using jQuery

<SCRIPT language="javascript">
$(function(){
 
    // add multiple select / deselect functionality
    $("#selectall").click(function () {
          $('.case').attr('checked', this.checked);
    });
 
    // if all checkbox are selected, check the selectall checkbox
    // and viceversa
    $(".case").click(function(){
 
        if($(".case").length == $(".case:checked").length) {
            $("#selectall").attr("checked", "checked");
        } else {
            $("#selectall").removeAttr("checked");
        }
 
    });
});
</SCRIPT>
Read More

Wednesday 10 April 2013

Set Value In Hidden Field Using JQuery

$('input[name="currentPage"]').attr('value',currentPage);
Read More

Select Value From Input Box onChange



 $("#whereToId").change(function () {
   var str = "";
   $("#whereToId option:selected").each(function () {
   str += $(this).val() + " ";
   });
   alert(str);

   
 })
.change();
Read More

Jquery Html Append



<!DOCTYPE html>
<html>
<head>
  <style>
  p { background:yellow; }
</style>
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
  <p>I would like to say: </p>
  <div id="mydiv"></div>
<script>
  $("p").append("<strong>Hello</strong>");
  $("#mydiv").append("<p><strong>Hello</strong></p>");
  
</script>

</body>
</html>
Read More

Monday 11 March 2013


Web Designing Online Books

1. Getting Real from 37Signals
Getting real is one of the most famous books for web designing. It covers everything you need to know to create a faster, smarter and successful web application. The book comes in PDF, Paperback and Online format. Good thing is that the online version is free to read and use. So get some time to read it for sure.
This online white paper is for Flash developers but anyone serious about web design/development should read this. It is well written and practical. Showing you how to make your web site from the users side of view instead of the designers side of view, taking into account how to make it accessible for everyone, all the little things most web developers and designers miss along the way.
A very small whitepaper but very effective. It provides insight about the web designing ideas and things to care through few case studies. I found it very interesting to read and an eye opener. Even if you are not in web designing field but still I would suggest you to read it. If you have your own blog or website, you will find it very useful.
4. Access by Design from Universal Usability Written by Sarah Horton
Access by Design is organized into tight, well-constructed chapters each of which focuses on a key area of design, such as forms, color, and layout. I highly recommend “Access by Design” on the merits of its conscientious but practical promotion of accessibility combined with its focus on functionality and usability.
jQuery is one of the most widely used Javascript based framework for creating exceptional web pages. If you want to learn jQuery that is must for any front-end developer, then this is the best place to start off. It starts with basics and provide all the jQuery functions in a very easy-to-read manner. A good read for beginners.
The Web Book is a 350-page book that tells you everything you need to know in order to create a home or business Web site from scratch. It covers everything from registering a domain name and renting some hosting space, to creating your first HTML page, to building full online database applications with PHP and MySQL. It also tells you how to market and promote your site, and how to make money from it. Earlier they used to charge for the PDF eBook but it seems that its free now and you just need to subscribe to their newsletter.
A basic web design book written by Mark Boulton and divided into five simple steps – Getting Started, Research and Ideas, Typography, Colour and Layout.
8. Web Style Guide written by Patrick J. Lynch and Sarah Horton
Web Style Guide 3rd Edition can be read online for free. It contains 12 chapters which covers topics about Process, Universal Usability, Information Architecture, Interface Design, Site Structure, Page Structure, Page Design, Typography, Editorial Style, Forms and Applications, Graphics and Multimedia.
A classic book in the field of Typographic styles. Indeed the renowned typographer Hermann Zapf proclaims the book to be “a must for everybody in the graphic arts, and especially for our new friends entering the field.”
10. Dive Into HTML5 by Mark Pilgrim
Dive Into HTML5 seeks to elaborate on a hand-picked Selection of features from the HTML5 specification and other fine Standards. A must read for anybody want to know the basics of HTML5.
“Shawn Henry lives and breathes accessibility. Her book is everything you’d expect it to be: straightforward, practical, rigorous, and uplifting.” – Comment from Jeffrey Zeldman, publisher and creative director of A List Apart, author of Designing with Web Standards.
12. Search User Interfaces by Marti A. Hearst
This book presents the state of the art of search interface design, based on both academic research and deployment in commercial systems. It has been selected by Search Engine Land as one of the best SEO books of 2009.
13. Web Design Reference Guide by Peachpit
This guide provides a snapshot of everything about Web design. The information in this guide includes reference, news, and access to the Web design community.

Web Designing eBooks in PDF – Free Download

1. The Woork Handbook by Antonio Lupetti
The book contains the posts from the authors blog that is very popular among web designers. The eBook is also available on Scribd and it has been selected on Scribd as a featured document.
Web Designer’s Success Guide is the definitive guide to starting your own freelance Web design business.
3. Design Your Imagination by WebGuru India
This free ebook can be termed as a complete and comprehensible guide on website design. Almost every aspect of website design is exemplified in this ebook by representing ample examples. This web design ebook will definitely help the beginners to hone their creativity.
4. How To Be Creative by Hugh MacLeod
MacLeod, an advertising executive and popular blogger with a flair for the creative, gives his 26 tried-and-true tips for being truly creative. Each point illustrated by a cartoon drawn by the author himself.
5. Introduction to Good Usability written by Peter Pixel
A good and short book defining web design principles and usage of Breadcrumbs, Tags, Drop Downs, Overlays, Icons etc.
6. Taking Your Talent to the Web from zeldman written by Jeffrey Zeldman
Its one of the oldest book on Web designing published way back in 2001. However its good to read and the advices given still hold true.
7. Why Design? by AIGA
What designers offer to clients is a way of thinking. The “Why design?” booklet outlines the role of design in business strategy. It seeks a common framework for why design adds value to clients’ interests.
The Design Funnel doesn’t introduce any new tools. It’s simply a roadmap of when a designer can use which tools to stimulate better work. As a matter of fact, many successful creatives use similar processes on a daily basis.
The eBook can be downloaded as PDF or in the HTML format. It provides basic insight of accessibility of websites and good read for new web designers as a basic guide book.
Hugh Dubberly’s book looks at “over one-hundred descriptions of design and development processes, from architecture, industrial design, mechanical engineering, quality management, and software development”.
Massimo Vignelli’s book covers everything you could want to know about typography in graphic design.
12. KnockKnock by Seth Godin
Seth Godin is the founder of Squidoo Lenses, one of the famous web marketing tool used by online marketers. In this book he provide his inputs to make a successful website. A must read to learn a lot from his experience.
Eloquent JavaScript is a book providing an introduction to the JavaScript programming language and programming in general.
This is an eBook for beginners who are trying to create their first website. Its a step by step guide that you can follow and create your own website in very less time. Good for starters in World Wide Web.
Another eBook for startup in website design. Good read for the newbie in in website creation and designing field.
This guide introduces you to just the main elements of HTML5 that you’ll probably want to use right away. This guide is for those who want to get the basics figured out first, and worry about the finer details later on.
17. Type Classification eBook by Just Creative Design
Read More

Blogger

Related Posts Plugin for WordPress, Blogger...