This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- AJAX Sample Asyc | |
yahoo weather api | |
http://developer.yahoo.com/yql/console/#h=select%20*%20from%20weather.forecast%20where%20woeid%3D2502265 | |
http://jsfiddle.net/mbhatamb/mKFY3/1/ | |
--> | |
<html> | |
<p>Select City </p> | |
<hr> | |
<div class="cities"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<!-- Day And Night Example with simple Buttons | |
http://jsfiddle.net/mbhatamb/ba3FC/1/--> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>JQuery Dom Maniupulation with list</title> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<!-- http://jsfiddle.net/mbhatamb/P4kTB/ --> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>JQuery Dom Maniupulation with list</title> | |
</head> | |
<body> | |
<h1>Example of tabs() API inconsistency when adding a tab.</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
http://jsfiddle.net/mbhatamb/F9rGz/ | |
Standardized and defined by Douglas Crockford (www.json.org), | |
Advandates | |
- lightweight | |
- fast | |
- readable | |
- natural to javascript object | |
where as XML is verbose. Douglas says, any dumb can create a better format than XML. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create a class Employee, with first and LastName | |
//http://jsfiddle.net/mbhatamb/d9WqV/ | |
/* Note : This is the right way to define a class in Javascript, | |
using the prototype object, which is there for each object | |
This is the right way to define a Javascript Object.. | |
*/ | |
var Employee = function(fName, lName) { | |
this.fName = fName; | |
this.lName = lName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//by default, a function has access to this and arguments objects. | |
//arguments.callee() function calls the function itself, to use for recursive | |
function doSomething(){ | |
arguments.callee(); //gives the name of function, without having to explicity name it | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
var aElement = document.getElementById("intro"); | |
//Properties that can be invoked on aElement are | |
/* | |
x.innerHTML - the text value of x | |
x.nodeName - the name of x | |
x.nodeValue - the value of x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Rolls a 6 faced dice 6000 times and summarizes the results of | |
//how many times each face came | |
var f1 = 0; | |
var f2 = 0; | |
var f3 = 0; | |
var f4 = 0; | |
var f5 = 0; | |
var f6 = 0; | |
var diceFace; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- use html editor to try : http://htmledit.squarefree.com/ --> | |
<?xml version="1.0" encoding="utf-8"> | |
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Strict//EN" "http://w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<title> Welcome , Webpage elements </title> | |
<!-- meta tags are used by search engines --> | |
<meta name ="keywords" content="java , html elements, basic html tags"/> | |
<meta name ="description" content=" This is a sample html page which has most of the commonly used eleemnts"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"> | |
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Strict//EN" "http://w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<title> Welcome , Webpage elements </title> | |
<!-- meta tags are used by search engines --> | |
<meta name ="keywords" content="java , html elements, basic html tags"/> | |
<meta name ="description" content=" This is a sample html page which has most of the commonly used eleemnts"/> |
NewerOlder