Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions javascript window.addeventlistener load
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
javascript window.addeventlistener load
1 Answer(s)      3 years and 2 months ago
Posted in : JavaScript Questions


How to load window.addeventlistener in JavaScript?


Advertisement
View Answers

September 20, 2011 at 1:11 PM


window.addEventListener('load', function() { 

  var b = document.getElementById('box'),  
      xbox = b.offsetWidth  / 2, // half the box width 
      ybox = b.offsetHeight / 2, // half the box height  
      bstyle = b.style; // cached access to the style object  

  b.addEventListener('touchmove', function(event) {  
    event.preventDefault(); // the default behaviour is scrolling    
    bstyle.left =  event.targetTouches[0].pageX - xbox + 'px';   
    bstyle.top  =  event.targetTouches[0].pageY - ybox + 'px';  
  }, false);  

}, false);


Related Tutorials/Questions & Answers:
javascript window.addeventlistener load
javascript window.addeventlistener load  How to load window.addeventlistener in JavaScript?   window.addEventListener('load', function() { var b = document.getElementById('box'), xbox = b.offsetWidth / 2
how to load value in dropdown list after selecting value from first dropdown list using javascript
how to load value in dropdown list after selecting value from first dropdown list using javascript  how to load value in dropdown list after selecting value from first dropdown list using javascript
Advertisements
Ajax Load
Ajaxload The ajaxload is a tool, which follow web2.0 standard. Due to slow Internet speed or delay some times data takes time to load. At this time we can incorporate an animated gif image, which indicate user for the loading
Load Icon Image Exception
Load Icon Image Exception  Load Icon Image Exception
how to load pdf on html
how to load pdf on html  how to load pdf on html
Load UIImage from URL
Load UIImage from URL  Load UIImage from URL
nsstring load from file
nsstring load from file  Hi, How to load file data into NSString object? Example of nsstring load from file, basically the html file data into NSSTring object. Thanks
jQuery Ajax load request
jQuery Ajax load request  Hi, How to use jQuery to send the request on server to load data in web page? Thanks   Hi, In the jQuery Load... and then load the data in web page. Thanks
UIWebview load url
UIWebview load url  How to load website url in UIWebview? Tell me code for UIWebview load url of a website Thanks...: //Load web view data NSString *strWebsiteUlr = [NSString stringWithFormat:@"http
date in textbox on page load
date in textbox on page load   i want to insret the current date... <script type="text/javascript"> function addDate...;/html>   Here is a javascript code that insert the current date
XML load problem - XML
XML load problem  I have load the xml document in javascript.getting error like ActiveXObject is undefined.Can you help me?  Hi friend... function load(){ var loadXML = new ActiveXObject
load more with jquery
load more with jquery  i am using jquery to loadmore "posts" from my... box its is going to display php posts and after that when i click on load more...; <script type="text/javascript" src="jquery-1.4.4.js"></script>
Load on Startup - JSP-Servlet
Load on Startup  Hi, Can anybody explain the exact use of load-on-startup tag. Where exactly we have to write. Thanks, Naveen  ... of a deployment descriptor is used to load a servlet file when the server starts instead
J2me Map load error
J2me Map load error  Hi , i am making a POC to load google map in my mobile,now i m getting the address of location by its lattitude and longitude in web page , but thing is i wana to store in my net beans emulator , its showing
session on page load
session on page load  holding session on page load and reload..   <?php session_start(); if (!isset($_SESSION['arr']['counter'])) { $SESSION['arr']['counter'] = 0; } else { $SESSION['arr']['counter']++; } var_dump
load and upload. - JSP-Servlet
load and upload.  dear sir, plz give me the sol for my problem.i m waiting for u r reply. why u not replying ..   Hi Friend, We haven't remember your problem. So please send it again. Thanks
Form Should not load
box after submitting or the form should not load again. Thanks in adbance
load and upload. - MobileApplications
load and upload.  Dear sir/mam, i want code for java based application, that can take .3GP video file and upload it to youtube using youtube's APIs. The video file would be located on a weblink (a direct http link to a video
Hibernate Session Load
This section contain description of Hibernate session load
Load function ***PLEASE HELP
Load function ***PLEASE HELP   Hi I am writing a program that tracks... a load function that prompts the user for the file name to be loaded and then it loads the stats. Here are the exact instructions. LOAD: Prompts the user
JavaScript
JavaScript  clone JavaScript
down load jar file - JavaMail
down load jar file  i want to down load james2.1.3 file.where is location it got it.  Hi Friend, You can download James Server from the following link: http://james.apache.org/download.cgi Thanks
javascript
javascript  javascript code to dynamically add table on button click.../javascript/javascriptexamples/javascript-add-row-dynamically.shtml http://www.roseindia.net/javascript/javascript-add-row-to-table.shtml http://www.roseindia.net
Javascript
Javascript  How validations are done using javascript ,with example? and interview questions on javASCRIPT
javaScript
javaScript  How to open a browser window that cannot be resized? (HTML + Javascript
javascript
javascript  write a program to display implement about browsers using javascript
javascript
javascript  Hi deepak, how to write form validation on javascript
JavaScript
JavaScript  how to get full path of a file type in javascript
JavaScript
should use JavaScript? Thanks   Hi, JavaScript is scripting language that runs on browser. You have to embed JavaScript in HTML page. Please see JavaScript tutorial. Thanks
javascript
javascript  i have just learned javascript... can you tell me what kind of applications can be made by javascript?? thank you
How to load Arabic csv to MYSQL
How to load Arabic csv to MYSQL  I tried the following set session collation_database=utf8_general_ci; set session character_set_database=utf8 ; #SET NAMES utf8; #SET character_set_database=utf8; LOAD DATA local INFILE
Advertisements
 

 

 

DMCA.com