Import css_browser_selector.js in your head section
css_browser_selector.js
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>
...
Monday, 8 July 2013
Friday, 14 June 2013
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);
}
}
...
Thursday, 6 June 2013
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]])...
Thursday, 30 May 2013
<input type="checkbox" checked="true" onclick="return false"/&g...
Wednesday, 29 May 2013
Tuesday, 16 April 2013
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>
...
Thursday, 11 April 2013
<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...
Wednesday, 10 April 2013
$('input[name="currentPage"]').attr('value',currentPage...
$("#whereToId").change(function () {
var str = "";
$("#whereToId option:selected").each(function () {
str += $(this).val() + " ";
});
alert(str);
})
.change()...
<!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>...
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.
2. Developing User-Friendly Flash Content from Flazoom
This...
Subscribe to:
Posts (Atom)