Showing posts with label Technology. Show all posts
Showing posts with label Technology. Show all posts

University of Phoenix (UOPX) United States Top University

Saturday


University of Phoenix (UOPX) United States Top University,University, Top 10, Technology, special education, Us Education, Education,

University of Phoenix (UOPX) United States Top University

The University of Phoenix (UOPX) is an American revenue driven foundation of higher learning, headquartered in Phoenix, Arizona, United States. The college has an open-enlistment confirmation arrangement, obliging a secondary school recognition, GED, or its proportionate as its standard for affirmations. The college has 112 grounds overall and gives degrees in more than 100 degree programs at the partner, bachelor's, expert's and doctoral degree levels. It is a completely possessed backup of Apollo Group Inc., a traded on an open market (NASDAQ: APOL) Phoenix-based organization that claims a few for-benefit instructive establishments.

The University of Phoenix accomplished a top enlistment of very nearly 600,000 understudies in 2010, however its numbers have declined to 227,000 starting 2015. The enlistment drop (and more than 100 grounds closings) have been ascribed to operational changes in the midst of feedback of high obligation loads and low occupation prospects for understudies of revenue driven universities.

Grounds
While the school has some expertise in online projects, the grounds offer extra projects and administrations. Online understudies are additionally ready to utilize coaching and social focuses, which can likewise be utilized for social and understudy gatherings. The principal focus opened in 2007 in Plano, Texas.

Confirmations and money related guide
The University of Phoenix has an open confirmations strategy. In light of dissentions about the utilization of budgetary guide by revenue driven schools in 2010 the college started an introduction project intended to lower dropout and default rates. Understudies should effectively finish a three-week introduction workshop keeping in mind the end goal to be qualified to begin their first credit/expense bearing course. Understudies who don't finish the workshop after two endeavors must hold up six months prior to endeavoring once more.
Phoenix selected understudies utilizing high-weight deals strategies by confirmations guides who are paid, to a limited extent, in light of their accomplishment in enlisting understudies. Since 2010, progressions were executed to the way the college initiates understudies.

Personnel

The college's personnel comprises of more or less 1,500 center workforce and 20,000 partner (low maintenance or aide) employees who all hold graduate degrees.

UoP depends vigorously on unexpected workforce: 95 percent of Phoenix educators show low maintenance, contrasted with a normal of 47 percent across the country – . This dependence on low maintenance staff has been condemned by controllers and scholastic faultfinders. A large portion of the classes are midway made and institutionalized to guarantee consistency and to amplify benefits. Furthermore, no employees get residence.
Read more ...

Top Sensational 10 of the Year 2014

Sunday
Top Sensational 10 of the Year 2014
Top Sensational 10 of the Year 2014,Education, Technology, Albums,

We are coming to the end of this year 2014. This year, the music has a good turn. This year the world of music has got many new artist as well as revived old artist as well. Many new talents emerge in the field of pop rock and RnB.  Many Old artists like Leonard Cohen and U2 emerges this year with their blasting hits. This year seems to be fruitful to many ladies arties like Taylor Swift, Lady Gaga and Miley Cirus too.

The album like1989 of Taylor Swift, Anaconda of Nicki Minaz, Platinum of Miranda Lambert, Are we there of Sharon Van Etten are great albums that makes good impression in world music to give name and frame to women in music industries. Here are list of some sensational Music and their albums that make a good impact on the music industry this year.

1.       Songs of Innocence by U2 albums
This is 13th studio album of rock star band U2 which was released on early September this year 2014.  U2’s first album was No line on the Horizon which was released on 2009. This was produced by Danger Mouse and was announced at Apple Company. The album made a record of 500 million iTunes users which was marked as largest album release of all time. Total of 11 songs and the genre of music is rock.
Top Sensational 10 of the Year 2014,U2

2.       High Hopes by Bruce Springsteew
This is the 18th album of American rock star bruce springsteew which was released on mid January this year. This album was the rockstar’s 11th album that makes him third of all time number one album.  The album contains hard rock, alternative rock and funk music. The album contains 12 song tracks all composed and written by Bruce himself.

3.       Turn Blue by The Black Keys
This is the 18th album of rock due Black Keys which was produced by Danger Mouse. The album was released on late May 2014. The Black key’s previous album El camino was also biggest commercial and successful album. The album contains blues rock and garage rock numbers. The album contains total 11 tracks lists.
4.       St. Vincent by St VinCent
This is 4th album of music artist St. Vincent which was released on late February this year 2014. In UK. This album produced by John COlgeton. The album is highest charting in both Us and Uk list for St. Vincent. The album contains pop and rock musics. The album contains total 11 music tracks all composed and Written by AnnIe Clark.

5.       Platinium by MirAnda Lambert
The album is 5th album of artist Miranda. The album was releaed on early june this year. The album has 180k copies sold in first week. The album’s single automatic reached top 10 on Billboard and the artist first album that reached billboard 200. The album also won Album of the year at country music award. The album contains 16 sound track lists.

6.       SuckeR by Charli XcX
This album is 3rd album of singer Charli. The album released on mid December. This album is named as one of the best album of the year and got critical acclaims. The album contains punk rock and pop punk musics. There are total 13 tracks in this album.

7.       UltaViolece By Lana Del Rey
The album is 3rd album of song writer and singer Lana Del Rey. The album has 182k total copies sales for first week. According to some stats, it as total 2 million copies sold out worldwide. The album was released on mid June 2014. The album contain dream pop and desert rock genre of music.  The album has total 11 sound tracks of fiftyone minutes of total length of songs.

8.       Run the Jewels 2 by Killer Mike and EI-p
This album is 2nd album of Run the jewels released on early October this year 2014. The album record 12k copies sold for the first week in US. The album has al together 11 sound tracks.

9.       Salad Days by Mac DeMarco
The album is 2nd album of artist Mac DeMarco. The album was released on april of this year. The album contains pop music. This Canadian artist’s album is also short listed on 2014 polaris music award. The album contains 11 songs all composed and writted by singer Mac himself.

10.   1989 by Taylor Swift
This year has been sensational for Taylor Swift. This year she released her new album 1989 which remarks her birth year. The album was released on late October this year 2014. The album record 1.2 million copies sold for first week. The album has pop genre. It has total of 13 sound tracks with bonus tracks in list.


Read more ...

Pure Css Snow fall animation with Cat moving Animation

Tuesday
Pure Css Snow fall animation with Cat moving Animation
Merry Christmas!!!
Pure Css Snow fall animation with Cat moving Animation Education, Technology, Css, CSS3,

 I've never felt the snowfall. But I've seen many movies about Christmas and snow fall. Merry Christmas to all of you. Today I’m going to show some animation of snow fall with cat moving with pure css without any JavaScript. I get help from different blogs to create this demo. The demo is simply of css and use Images to animate and create the animation effect.

DEMO

Getting Started

 Html Body:
 The body consists of simple html div with class name. Div falling for snow falling and div tuna for moving cat.
 <div id='falling-snow' style=" left: 0; top: 0;"> </div>  
 <div class="tuna"></div>  

The CSS:
Now to create the effect, we need different images. We need three different snow images of different sizes and focus. Next we need the sprite image of cat to make the cat move. We’ll overlay the images on the top of another to make the effect of moving.
 html {text-align: center;}  
 body{  
 background: url(cd-snow-night-square.jpg) no-repeat center center fixed;  
 -webkit-background-size: cover;  
  -moz-background-size: cover;  
  -o-background-size: cover;  
  background-size: cover;  
 }  
 .tuna {  
  background: url(http://stash.rachelnabors.com/img/codepen/tuna_sprite.png) 0 0 no-repeat;   
   background-size: 800px auto;  
  height: 100px;  
  width: 200px;  
  top:90%;  
 }  
 #falling-snow {  
 background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV07SflBHj3dkC-B20X2hkgDp2qHmwFIYVjACaSoJccVIIYeW6701CG_lmW4k_a_6l3-mV_FNW_NjqZ_jpFYaZ18f_Go8df15AHJgu5JIEFFuyNubnlPAP-HHp3sGx1n1CZ4j6ZUg5IzQn/s1600/snow.png), url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfslysg2AT6KVYpuDRrJtFlZx-e_UnKYglgwwYx3PnntQu4O2NomyvO908SdzqQ0MJnhIvXHkN1WSyIZLBIGqq9Zfdc9e6_30imOHH7EMkZFw95vzkex_D5ROnllVgeRdHqxCfKVeNVyP/s1600/snow3.png), url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRNTvDTN9keTdEvIS25T7xbdXAZuvrG-Gm0y1SSZghcJV-jmwRKFkl5uBezAH_WV47itPEmFr-gsXTBMxLQnU2ZvUWWCC6icF4WAHs2nr0Nw3bCOIfQwdw0wDY1ojxegdHa8PlSqZMB41_/s1600/snow2.png);  
 width:100%;  
 height:100%;  
 }  

Next thing is to make animation. Here we use keyframe. This is required to make animation of the images.
 @keyframes snow {  
 0% {background-position: 0px 0px, 0px 0px, 0px 0px;}  
 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}  
 }  
 @-moz-keyframes snow {  
 0% {background-position: 0px 0px, 0px 0px, 0px 0px;}  
 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}  
 }  
 @-webkit-keyframes snow {  
 0% {background-position: 0px 0px, 0px 0px, 0px 0px;}  
 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}  
 }  
 @-ms-keyframes snow {  
 0% {background-position: 0px 0px, 0px 0px, 0px 0px;}  
 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}  
 }  
 @keyframes walk-cycle {   
  0% {background-position: 0 0; }   
  100% {background-position: 0 -1191.5px; }   
 }  
Here keyframe name snow is for falling snow and walk-cycle is for walking cat.

Now we add keyframe to respective image div to show the animation
 #falling-snow {  
 background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV07SflBHj3dkC-B20X2hkgDp2qHmwFIYVjACaSoJccVIIYeW6701CG_lmW4k_a_6l3-mV_FNW_NjqZ_jpFYaZ18f_Go8df15AHJgu5JIEFFuyNubnlPAP-HHp3sGx1n1CZ4j6ZUg5IzQn/s1600/snow.png), url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfslysg2AT6KVYpuDRrJtFlZx-e_UnKYglgwwYx3PnntQu4O2NomyvO908SdzqQ0MJnhIvXHkN1WSyIZLBIGqq9Zfdc9e6_30imOHH7EMkZFw95vzkex_D5ROnllVgeRdHqxCfKVeNVyP/s1600/snow3.png), url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRNTvDTN9keTdEvIS25T7xbdXAZuvrG-Gm0y1SSZghcJV-jmwRKFkl5uBezAH_WV47itPEmFr-gsXTBMxLQnU2ZvUWWCC6icF4WAHs2nr0Nw3bCOIfQwdw0wDY1ojxegdHa8PlSqZMB41_/s1600/snow2.png);  
 -webkit-animation: snow 20s linear infinite;  
 -moz-animation: snow 20s linear infinite;  
 -ms-animation: snow 20s linear infinite;  
 animation: snow 20s linear infinite;  
 width:100%;  
 height:100%;  
 }  
 .tuna {  
  animation: walk-cycle 1s steps(6) infinite;  
  background: url(http://stash.rachelnabors.com/img/codepen/tuna_sprite.png) 0 0 no-repeat;   
   background-size: 800px auto;  
  height: 100px;  
  width: 200px;  
   top:90%;  
 }  

Now the last thing left is to move the cat. For this we use code marquee to move the cat from one end to another. 
 <marquee>  
 <div class="tuna"></div>  
 </marquee>  

Final Code
 <!doctype html>  
 <html>  
 <head>  
 <title>Falling Snow with Cat Moving Example | educateinsure.blogspot.com</title>  
 <style>  
 @keyframes snow {  
 0% {background-position: 0px 0px, 0px 0px, 0px 0px;}  
 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}  
 }  
 @-moz-keyframes snow {  
 0% {background-position: 0px 0px, 0px 0px, 0px 0px;}  
 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}  
 }  
 @-webkit-keyframes snow {  
 0% {background-position: 0px 0px, 0px 0px, 0px 0px;}  
 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}  
 }  
 @-ms-keyframes snow {  
 0% {background-position: 0px 0px, 0px 0px, 0px 0px;}  
 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}  
 }  
 body{position:relative;background-color:red;}  
 #falling-snow {  
 background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE4yAjn5EuTBdO_m0CZaerTrbHNMaBw9aH-ST7dd32vFQMesuCtJoJDTsD6IHL9WoeUelWOGgtdESopy93iktsiwB70xFzu6xvl10qHeyxBB8FsRo2pSf-vcg2JuAupdsR73FNzDiRZuSx/s1600/snow.png), url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh04A2omV_ddpWzQiN7AlF8QjaGO8Tab7CeHz5VcMy1XAWh7uI58Asxes0HUxy7DJK5wkfcpbm0fctv6cDO1A71wg-Z1UtCD-JVIBWTRzebJt6q0YA5dfETKyp-PQHiCPk4W7h3a9KwRfFF/s320/snow3.png), url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCaH5voPQeej1itZifcfO2VMlX_vScaDbfh4IN6a0eDdk-mfcQQg7tprCVmU0yoY-wGGLo-O0O9XVE5LtZ3-LJtP9YxlNIDkkWddaZRMgGXS3wdx579HXG87gNE5CDuPQEO_k0j5RZVPaa/s1600/snow2.png);  
 -webkit-animation: snow 20s linear infinite;  
 -moz-animation: snow 20s linear infinite;  
 -ms-animation: snow 20s linear infinite;  
 animation: snow 20s linear infinite;  
 width:100%;  
 height:100%;  
 }  
 .tuna {  
  animation: walk-cycle 1s steps(6) infinite;  
  background: url(http://stash.rachelnabors.com/img/codepen/tuna_sprite.png) 0 0 no-repeat;   
   background-size: 800px auto;  
  height: 100px;  
  width: 200px;  
  top:90%;  
 }  
 @keyframes walk-cycle {   
  0% {background-position: 0 0; }   
  100% {background-position: 0 -1191.5px; }   
 }  
 body{  
 background: url(cd-snow-night-square.jpg) no-repeat center center fixed;  
 -webkit-background-size: cover;  
  -moz-background-size: cover;  
  -o-background-size: cover;  
  background-size: cover;  
 }  
 html {text-align: center;}  
 </style>  
 <body>  
  <div id='falling-snow' style=" left: 0; top: 0;">  
 </div>  
 <marquee>  
 <div class="tuna"></div>  
 </marquee>  
 </body>  

Conclusion
So, we have here the complete example of pure css animation of snow fall and moving cat.  The DemoCan is seen Here You will need CSS3 support browser to view the demo. Prefer Mozilla firefox.


Image source:
Background image: jazzalert[dot]files[dot]wordpress[dot]com/2009/12/cd-snow-night-square.jpg
Moving cat: stash[dot]rachelnabors[dot]com/img/codepen/tuna_sprite.png

Read more ...

New Traffic Rules, Recent seven rules for drivers

Saturday
New Traffic Rules, Recent seven rules for drivers,Education

Seven Recent New Rules for Drivers

Nepal is country with poor development in roads. The road condition of Kathmandu valley is getting worst day by day. Getting a license was easy few years ago but due to the change in the rules of Government of Nepal, the procedure of getting license is harder.  In the recent days, the accident is increasing. The death rate due to accident is also increasing. The frequent news of people dying due to road accident makes government force to implement new rules for drivers. These are seven new rules that the government recently updated for drivers.
New rules for Drivers 7
1. To get the driving license, one must pass SLC or secondary level of education. Lack of education and not knowing proper rules of traffic is also cause of accident. So the government has forced rule that the person must pass SLC or up to class ten to get a driving license.
2. To drive Buses or Microbuses, one must be 25 years of age. There are more news of accident due to buses and microbuses. Most of drivers and conductor of these vehicles were immature, so most of accidents occur.  As a result, the government has implemented a rule that to drive Buses or Microbuses, he or she must be 25 years of age.
3. One must have 2 years of experience in driving small vehicle before driving larger vehicle. Most of accident occurs due to inexperience drivers. Now the new rule has been implemented that to drive larger vehicle or truck, buses, the driver must have at least two year of experience in driving smaller vehicles.
4. To be a taxi driver one must be 23 years of age.Very Small roads, many vehicles are causing lot of accidents. Also the drivers are immature. So if you want to be a taxi driver, you must be at least twenty three years of age.
5. After getting license, the person is not allowed to drive in long route for 1 year. Long route driving is risky. The long route vehicles are also heavy vehicles. The new drivers are not allowed to drive in long route. His or her driving license must be at least one year old before going for long route drive.
6. Public vehicle and private vehicle driver must give different exams. The exam for driving public vehicle is different from driving private vehicle. One must give two different exams to get license for driving both vehicles.
7. If the vehicle loads more people than its capacity then the license of driver is confiscated. One of major problem of public vehicles these days is overcapacity of passengers. The public vehicle like buses and microbuses loads more and more passengers than their capacity. The over speed and over limit of passengers in vehicles are causing more accidents and more loss of lives. So the government has made a strict rule that the vehicle must not load passengers more than its capacity. If the rule is broken then his or her license is confiscated on the spot by traffic or authorized person.
Don’t drink and drive and save yourself from mapase and accident.



Read more ...

Search Whatever You like

Friday

Search Whatever You like !!!!

Internet has become one of the needs of human Life. Now a day we use internet to search about the problems we face in our daily life. Google comes as a prominent search engine that most of the people use for searching. Google, Yahoo or Bings are most used search engine in the world.
But there are many search engines in the world that are being used. Here is a list of such few search engines that can be helpful for the users in searching specific items in the specific fields.


1. Social Search
Nowadays there are lot of social media sites like facebook, twitter, and blogs. If you want to search contents of social media then icerocket.com can be fruitful. Icerocket.com is a search engine that helps in searching social media contents. You can click icon for different social media sites. Icerocket.com helps in finding different trends in social media.




2. Image and Video Search
If you want to search images or video of certain person then we go to google or youtube to find the content. But Tineye.com can be good search engine for searching images you want. Tineye.com has reverse search engine technique which helps in searching images and the change that are made in that image. Similarly Blinkx.com can be good option for searching videos. It also provides the list of videos that are not found in youtube.com. You can select different categories for searcing the videos.


3. Meta Search
Meta search engine is also one of the good search engine that comes after google. It uses multiple search engines and compile data. The data are managed properly. It uses search engines like Dogpile.com, Zapmeta.com, Search.com etc. Also if you want to listen to music or watch video or film then search.creativecommons.org can be good option after google. If you want to search for images then you can use Pixabay, Jamendo or ccMixter.


4. Medical Search
If you want to gain knowledge regarding medical field then you can opt iMedisearch.com. It is different from google and provide better list of search values than google. It is also good for finding statistical data.


5. Kids Search
Kidrex.org is one of the search engine that help for kids in searching. It filters the content for kids. It is also a secure site. It provides result to the user that doesn't hamper the psychology of the kids. You can allow your kids to use this site for searching the contents.

6. Natural Language Search
Most of the search engine use word searching techniques. But if you want to search the content that you don't know or search the sites that you don't know then Ask.com can be good option. We can search using questions in this search engine.


Read more ...

JavaScript Events

Thursday

Javascript Events and Functions

Here are some of the list of javascript events and function that are used in javascript.

 .bind()

Attach a handler to an event for the elements.

$("p").bind("myCustomEvent", function(e, myName, myValue){
$(this).text(myName + ", hi there!");
$("span").stop().css("opacity", 1)
.text("myName = " + myName)
.fadeIn(30).fadeOut(1000);
});
$("button").click(function () {
$("p").trigger("myCustomEvent", [ "John" ]);
});

 .blur()

Bind an event handler to the “blur” JavaScript event, or trigger that event on an element.

 .change()

Bind an event handler to the “change” JavaScript event, or trigger that event on an element.

 <select name="sweets" multiple="multiple">
<option>Chocolate</option>
<option selected="selected">Candy</option>
<option>Taffy</option>
<option selected="selected">Caramel</option>
<option>Fudge</option>
<option>Cookie</option>
</select>
<div></div>
<script>
$("select").change(function () {
var str = "";
$("select option:selected").each(function () {
str += $(this).text() + " ";
});
$("div").text(str);
})
.change();

 .click()

Bind an event handler to the “click” JavaScript event, or trigger that event on an element.

 .dblclick()

Bind an event handler to the “dblclick” JavaScript event, or trigger that event on an element.

 .delegate()

Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.

 .die()

Remove event handlers previously attached using .live() from the elements.

 .error()

Bind an event handler to the “error” JavaScript event.

 event.currentTarget

The current DOM element within the event bubbling phase.

 event.data

An optional object of data passed to an event method when the current executing handler is bound.

<button> 0 </button>
<button> 1 </button>
<button> 2 </button>
<button> 3 </button>
<button> 4 </button>
<div id="log"></div>

<script>
var logDiv = $("#log");
/* Note: This code is for demonstration purposes only. */
for (var i = 0; i < 5; i++) {
$("button").eq(i).on("click", {value: i}, function(event) {
var msgs = [
"button = " + $(this).index(),
"event.data.value = " + event.data.value,
"i = " + i
];
logDiv.append( msgs.join(", ") + "<br>" );
});
}
</script>

 event.delegateTarget

The element where the currently-called jQuery event handler was attached.

 event.isDefaultPrevented()

Returns whether event.preventDefault() was ever called on this event object.

$("a").click(function(event){
alert( event.isDefaultPrevented() ); // false
event.preventDefault();
alert( event.isDefaultPrevented() ); // true
}); 

 event.isImmediatePropagationStopped()


Returns whether event.stopImmediatePropagation() was ever called on this event object.

<script>
function immediatePropStopped(e) {
var msg = "";
if ( e.isImmediatePropagationStopped() ) {
msg = "called"
} else {
msg = "not called";
}
$("#stop-log").append( "<div>" + msg + "</div>" );
}
$("button").click(function(event) {
immediatePropStopped(event);
event.stopImmediatePropagation();
immediatePropStopped(event);
});
</script>

 event.isPropagationStopped()

Returns whether event.stopPropagation() was ever called on this event object.

 event.metaKey

Indicates whether the META key was pressed when the event fired.

<script>
$('#checkMetaKey').click(function(e){
$('#display').text(e.metaKey);
});
</script>

 event.namespace

The namespace specified when the event was triggered.
<script>
$("p").on("test.something", function(event) {
alert( event.namespace );
});
$("button").click(function(event) {
$("p").trigger("test.something");
});
</script>

 event.pageX

The mouse position relative to the left edge of the document.

<script>$(document).on('mousemove',function(e){
$("#log").text("e.pageX: " + e.pageX + ", e.pageY: " + e.pageY);
}); </script>


 event.pageY

The mouse position relative to the top edge of the document.

 event.preventDefault()

If this method is called, the default action of the event will not be triggered.

 event.relatedTarget

The other DOM element involved in the event, if any.
$("a").mouseout(function(event) {
alert(event.relatedTarget.nodeName); // "DIV"
});

 event.result

The last value returned by an event handler that was triggered by this event, unless the value was undefined.

<script>
$("button").click(function(event) {
return "hey";
});
$("button").click(function(event) {
$("p").html( event.result );
});
</script>

 event.stopImmediatePropagation()

Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.

 event.stopPropagation()

Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.

 event.target

The DOM element that initiated the event.

<script>$("body").click(function(event) {
$("#log").html("clicked: " + event.target.nodeName);
}); </script>

 event.timeStamp

The difference in milliseconds between the time the browser created the event and January 1, 1970.

<script>
var last, diff;
$('div').click(function(event) {
if ( last ) {
diff = event.timeStamp - last
$('div').append('time since last event: ' + diff + '<br/>');
} else {
$('div').append('Click again.<br/>');
}
last = event.timeStamp;
});
</script>

 event.type

Describes the nature of the event.

 event.which

For key or mouse events, this property indicates the specific key or button that was pressed.

 .focus()

Bind an event handler to the “focus” JavaScript event, or trigger that event on an element.

<script>
$("input").focus(function () {
$(this).next("span").css('display','inline').fadeOut(1000);
});
</script>

 .focusin()

Bind an event handler to the “focusin” event.

 .focusout()

Bind an event handler to the “focusout” JavaScript event.

<script>
var fo = 0, b = 0;
$("p").focusout(function() {
fo++;
$("#fo")
.text("focusout fired: " + fo + "x");
}).blur(function() {
b++;
$("#b")
.text("blur fired: " + b + "x");
});
</script>

 .hover()

Bind one or two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.

<script>
$("li").hover(
function () {
$(this).append($("<span> ***</span>"));
},
function () {
$(this).find("span:last").remove();
}
);
//li with fade class
$("li.fade").hover(function(){$(this).fadeOut(100);$(this).fadeIn(500);});
</script>


 jQuery.proxy()

Takes a function and returns a new one that will always have a particular context.

<script>
var me = {
type: "zombie",
test: function(event) {
/* Without proxy, `this` would refer to the event target */
/* use event.target to reference that element. */
var element = event.target;
$(element).css("background-color", "red");
/* With proxy, `this` refers to the me object encapsulating */
/* this function. */
$("#log").append( "Hello " + this.type + "<br>" );
$("#test").off("click", this.test);
}
};
var you = {
type: "person",
test: function(event) {
$("#log").append( this.type + " " );
}
};
/* execute you.test() in the context of the `you` object */
/* no matter where it is called */
/* i.e. the `this` keyword will refer to `you` */
var youClick = $.proxy( you.test, you );
/* attach click handlers to #test */
$("#test")
/* this === "zombie"; handler unbound after first click */
.on( "click", $.proxy( me.test, me ) )
/* this === "person" */
.on( "click", youClick )
/* this === "zombie" */
.on( "click", $.proxy( you.test, me ) )
/* this === "<button> element" */
.on( "click", you.test );
</script>


 .keydown()

Bind an event handler to the “keydown” JavaScript event, or trigger that event on an element.

<script>
var xTriggered = 0;
$('#target').keydown(function(event) {
if (event.which == 13) {
event.preventDefault();
}
xTriggered++;
var msg = 'Handler for .keydown() called ' + xTriggered + ' time(s).';
$.print(msg, 'html');
$.print(event);
});
$('#other').click(function() {
$('#target').keydown();
});</script>

.keypress()

Bind an event handler to the “keypress” JavaScript event, or trigger that event on an element.

<script>
var xTriggered = 0;
$("#target").keypress(function(event) {
if ( event.which == 13 ) {
event.preventDefault();
}
xTriggered++;
var msg = "Handler for .keypress() called " + xTriggered + " time(s).";
$.print( msg, "html" );
$.print( event );
});
$("#other").click(function() {
$("#target").keypress();
});</script>



.keyup()

Bind an event handler to the “keyup” JavaScript event, or trigger that event on an element.

.live()

Attach an event handler for all elements which match the current selector, now and in the future.

 .load()

Bind an event handler to the “load” JavaScript event.

.mousedown()

Bind an event handler to the “mousedown” JavaScript event, or trigger that event on an element.
<script>
$("p").mouseup(function(){
$(this).append('<span style="color:#F00;">Mouse up.</span>');
}).mousedown(function(){
$(this).append('<span style="color:#00F;">Mouse down.</span>');
});
</script>


.mouseenter()

Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.

.mouseleave()

Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.

.mousemove()

Bind an event handler to the “mousemove” JavaScript event, or trigger that event on an element.

.mouseout()

Bind an event handler to the “mouseout” JavaScript event, or trigger that event on an element.

 .mouseover()

Bind an event handler to the “mouseover” JavaScript event, or trigger that event on an element.

.mouseup()

Bind an event handler to the “mouseup” JavaScript event, or trigger that event on an element.

.off()

Remove an event handler.

<script>
function aClick() {
$("div").show().fadeOut("slow");
}
$("#bind").click(function () {
$("body").on("click", "#theone", aClick)
.find("#theone").text("Can Click!");
});
$("#unbind").click(function () {
$("body").off("click", "#theone", aClick)
.find("#theone").text("Does nothing...");
});
</script>


.on()

Attach an event handler function for one or more events to the selected elements.

<script>
$("p").on("myCustomEvent", function(e, myName, myValue){
$(this).text(myName + ", hi there!");
$("span").stop().css("opacity", 1)
.text("myName = " + myName)
.fadeIn(30).fadeOut(1000);
});
$("button").click(function () {
$("p").trigger("myCustomEvent", [ "John" ]);
});
</script>

.one()

Attach a handler to an event for the elements. The handler is executed at most once per element.

<script>
var n = 0;
$("div").one("click", function() {
var index = $("div").index(this);
$(this).css({
borderStyle:"inset",
cursor:"auto"
});
$("p").text("Div at index #" + index + " clicked." +
" That's " + ++n + " total clicks.");
});
</script>


.ready()

Specify a function to execute when the DOM is fully loaded.

 .resize()

Bind an event handler to the “resize” JavaScript event, or trigger that event on an element.
$(window).resize(function() {
$('body').prepend('<div>' + $(window).width() + '</div>');
});


.scroll()

Bind an event handler to the “scroll” JavaScript event, or trigger that event on an element.
<script>
$("p").clone().appendTo(document.body);
$("p").clone().appendTo(document.body);
$("p").clone().appendTo(document.body);
$(window).scroll(function () {
$("span").css("display", "inline").fadeOut("slow");
});
</script>


.select()

Bind an event handler to the “select” JavaScript event, or trigger that event on an element.
<script>
$(":input").select( function () {
$("div").text("Something was selected").show().fadeOut(1000);
});
</script>

.submit()

Bind an event handler to the “submit” JavaScript event, or trigger that event on an element.
<script>
$("form").submit(function() {
if ($("input:first").val() == "correct") {
$("span").text("Validated...").show();
return true;
}
$("span").text("Not valid!").show().fadeOut(1000);
return false;
});
</script>


.toggle()

Bind two or more handlers to the matched elements, to be executed on alternate clicks.
$("td").toggle(
function () {
$(this).addClass("selected");
},
function () {
$(this).removeClass("selected");
}
);


.trigger()

Execute all handlers and behaviors attached to the matched elements for the given event type.
<script>
$("button:first").click(function () {
update($("span:first"));
});
$("button:last").click(function () {
$("button:first").trigger('click');
update($("span:last"));
});
function update(j) {
var n = parseInt(j.text(), 10);
j.text(n + 1);
}
</script>


.triggerHandler()

Execute all handlers attached to an element for an event.
<script>
$("#old").click(function(){
$("input").trigger("focus");
});
$("#new").click(function(){
$("input").triggerHandler("focus");
});
$("input").focus(function(){
$("<span>Focused!</span>").appendTo("body").fadeOut(1000);
});
</script>

 .unbind()

Remove a previously-attached event handler from the elements.
<script>
function aClick() {
$("div").show().fadeOut("slow");
}
$("#bind").click(function () {
// could use .bind('click', aClick) instead but for variety...
$("#theone").click(aClick)
.text("Can Click!");
});
$("#unbind").click(function () {
$("#theone").unbind('click', aClick)
.text("Does nothing...");
});
</script>

.undelegate()

Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
<script>
function aClick() {
$("div").show().fadeOut("slow");
}
$("#bind").click(function () {
$("body").delegate("#theone", "click", aClick)
.find("#theone").text("Can Click!");
});
$("#unbind").click(function () {
$("body").undelegate("#theone", "click", aClick)
.find("#theone").text("Does nothing...");
});

.unload()

Bind an event handler to the “unload” JavaScript event.
$(window).unload( function () { alert("Bye now!"); } );

Read more ...

Simple Animation with Javascript and Css

Monday
Preview: Hover Mouse over the image:


   We can use simple animation using css and javascript.

1. First Create simple Div for placing image and the frame.
<div id="stage">
<div id="j" class="character"></div>
<div id="j2" class="character"></div>
<div id="j3" class="character"></div>
<div id="j4" class="character"></div>
</div>

2. Now Create css file for the Image and placeholder. You can create a inline css or external css file. Inline css can be created in same file using <style> tag.
<style>
#stage {
background-color:#cccccc;
border:1px solid black;
height:170px;
width:600px;
position:relative;
z-index:0;
-webkit-user-select: none;
}

.character {
height:50px;
width:40px;
position:absolute;
top:120px;
background-repeat:no-repeat;
background-position:0 0;
-webkit-user-select: none;
}

#j {
left:100px;
background-image: url('j.png');
}

#j2 {
left:200px;
background-image: url('j.png');
}

#j3 {
left:300px;
background-image: url('j.png');
}

#j4 {
left:400px;
background-image: url('j.png');
}

</style>

3. Now the main part of the animation is to be done. This can be done using the JavaScript. The <script> tag is used to place JavaScript in html page.

<script>
var RobotMaker = function (robot, run_speed, jump_height) {
var stage = document.getElementById('stage');
var run_timer, jump_timer;
var face_right = true;
var mouseX;
var running_dir = ''; 
var x = 0;
var y = 0;
function find_stage_offset (el){
x = el.offsetLeft;
y = el.offsetTop;
el = el.offsetParent;

while(el !== null) {
   x = parseInt(x) + parseInt(el.offsetLeft);
   y = parseInt(y) + parseInt(el.offsetTop);
   el = el.offsetParent;
 }

 return {xpos: x, ypos: y};
}
var stageOffset = find_stage_offset(stage);

function run_r(phase, left){
face_right = true;
running_dir = 'r';
if ((left + (15 * run_speed)) < (mouseX - robot.offsetWidth)){ 

left = left + (15 * run_speed);
robot.style.left = left+"px";
switch (phase){
case 1:
robot.style.backgroundPosition = "-40px 0px";
run_timer = setTimeout(function(){run_r(2, left);}, 200);
break;
case 2:
robot.style.backgroundPosition = "-80px 0px";
run_timer = setTimeout(function(){run_r(3, left);}, 200);
break;
case 3:
robot.style.backgroundPosition = "-120px 0px";
run_timer = setTimeout(function(){run_r(4, left);}, 200);
break;
case 4:
robot.style.backgroundPosition = "-80px 0px";
run_timer = setTimeout(function(){run_r(1, left);}, 200);
break;
}
} else if ((left + (15 * run_speed)) < mouseX) { 
robot.style.backgroundPosition = "0px 0px";
running_dir = '';
} else { 
running_dir = 'l';
run_l(1, robot.offsetLeft);
}
}

function run_l(phase, left){
face_right = false;
running_dir = 'l';
if (mouseX < robot.offsetLeft - (15 * run_speed)){ 

left = left - (15 * run_speed);
robot.style.left = left+"px";
switch (phase){
case 1:
robot.style.backgroundPosition = "-40px -50px";
run_timer = setTimeout(function(){run_l(2, left);}, 200);
break;
case 2:
robot.style.backgroundPosition = "-80px -50px";
run_timer = setTimeout(function(){run_l(3, left);}, 200);
break;
case 3:
robot.style.backgroundPosition = "-120px -50px";
run_timer = setTimeout(function(){run_l(4, left);}, 200);
break;
case 4:
robot.style.backgroundPosition = "-80px -50px";
run_timer = setTimeout(function(){run_l(1, left);}, 200);
break;
}
} else if (mouseX < (robot.offsetLeft + robot.offsetWidth - (15 * run_speed))){
robot.style.backgroundPosition = "0px -50px";
running_dir = '';
} else { 
running_dir = 'r';
run_r(1, robot.offsetLeft);
}
}

function jmp(up, top){
running_dir = '';
if (face_right){
robot.style.backgroundPosition = "-160px 0px";
} else {
robot.style.backgroundPosition = "-160px -50px";
}

if (up && (robot.offsetTop > (20 * (1 / jump_height)))){
top = top - (top * 0.1);
robot.style.top = top+"px";
jump_timer = setTimeout(function(){jmp(up, top);}, 60);
} else if (up) {
up = false;
jump_timer = setTimeout(function(){jmp(up, top);}, 60);
} else if (!up && (robot.offsetTop < 115)){
top = top + (top * 0.1);
robot.style.top = top+"px";
jump_timer = setTimeout(function(){jmp(up, top);}, 60);
} else {
robot.style.top = "120px";
if (face_right){
robot.style.backgroundPosition = "0px 0px";
} else {
robot.style.backgroundPosition = "0px -50px";
}

jump_timer = false;
if (mouseX !== undefined){
if (((robot.offsetLeft + (15 * run_speed)) < (mouseX - robot.offsetWidth)) && running_dir !== 'r'){ 
// make run right, if not already
running_dir = 'r';
clearTimeout(run_timer);
run_r(1, robot.offsetLeft);
} else if ((mouseX < robot.offsetLeft - (15 * run_speed)) && running_dir !== 'l') {
// make run left, if not already
running_dir = 'l';
clearTimeout(run_timer);
run_l(1, robot.offsetLeft);
}
}
}
}

function stage_mousemove_listener(e){
if (e.touches){
e.preventDefault(); 
if ((e.touches[0].pageX > stageOffset.xpos) 
&& (e.touches[0].pageX < (stageOffset.xpos + stage.offsetWidth))
&& (e.touches[0].pageY > stageOffset.ypos)
&& (e.touches[0].pageY < (stageOffset.ypos + stage.offsetHeight))){
mouseX = e.touches[0].pageX - stageOffset.xpos; 
} else { 
stage_mouseout_listener();
}

if ((e.touches[0].pageX > robot.offsetLeft) && (e.touches[0].pageX < (robot.offsetLeft + robot.offsetWidth))
&& (e.touches[0].pageY > (stageOffset.ypos + stage.offsetHeight - robot.offsetHeight))
&& (e.touches[0].pageY < (stageOffset.ypos + stage.offsetHeight))
&& (!jump_timer || jump_timer === undefined)){
clearTimeout(run_timer);
jmp(true, robot.offsetTop);
}

} else { 
var posX = 0;
if (!e){
var e = window.event;
}
 
if (e.pageX) {
posX = e.pageX;
} else if (e.clientX) {
posX = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
}
mouseX = posX - stageOffset.xpos;
}


if (((robot.offsetLeft + (15 * run_speed)) < (mouseX - robot.offsetWidth)) && running_dir !== 'r' && (!jump_timer || jump_timer === undefined)){ 
running_dir = 'r';
clearTimeout(run_timer);
run_r(1, robot.offsetLeft);
} else if ((mouseX < robot.offsetLeft - (15 * run_speed)) && running_dir !== 'l' && (!jump_timer || jump_timer === undefined)) {
running_dir = 'l';
clearTimeout(run_timer);
run_l(1, robot.offsetLeft);
} else if ((robot.offsetLeft < mouseX) && ((robot.offsetLeft + robot.offsetWidth) > mouseX) && running_dir !== '' && (!jump_timer || jump_timer === undefined)) {
running_dir = '';
clearTimeout(run_timer);
if (face_right){
robot.style.backgroundPosition = "0px 0px";
} else {
robot.style.backgroundPosition = "0px -50px";
}
}
}

function robot_mouseover_listener(){
if (!jump_timer || jump_timer === undefined){
clearTimeout(run_timer);
jmp(true, robot.offsetTop);
}
}

function stage_mouseout_listener(){
mouseX = undefined;
running_dir = '';
if (!jump_timer || jump_timer === undefined){
clearTimeout(run_timer);
if (face_right){
robot.style.backgroundPosition = "0px 0px";
} else {
robot.style.backgroundPosition = "0px -50px";
}
}

}

(function (){
if (stage.addEventListener){
stage.addEventListener('touchstart', stage_mousemove_listener, false);
stage.addEventListener('touchmove', stage_mousemove_listener, false);
stage.addEventListener('touchend', stage_mouseout_listener, false);

stage.addEventListener('mousemove', stage_mousemove_listener, false);
robot.addEventListener('mouseover', robot_mouseover_listener, false);
stage.addEventListener('mouseout', stage_mouseout_listener, false);
} else {
stage.attachEvent('onmousemove', stage_mousemove_listener);
robot.attachEvent('onmouseover', robot_mouseover_listener);
stage.attachEvent('onmouseout', stage_mouseout_listener);
}
})();
};

(function(){
var j = RobotMaker(document.getElementById('j'), 1, 1);
var j2 = RobotMaker(document.getElementById('j2'), .8, 5);
var j3 = RobotMaker(document.getElementById('j3'), 1.1, .5);
var j4 = RobotMaker(document.getElementById('j4'), .5, .75);
})();


</script>
Read more ...
loading...
loading...
Web Analytics