Java. X. Ultra small code to drag everything in HTML pages. A frequent question I receive from my readers is about how to implement a simple script to drag elements in a web page. So in this post I want to illustrate the simplest method I know and use to drag everything in HTML pages, using just three rows of Javascript code. In this post I provided a very basic script quick to reuse and customize in your web projects (in the live preview I added some little additional features respect the content of this tutorial). This is the result: Download this tutorial Live preview HTML code: HTML code is very simple. Copy and paste this code in your page: <div id="draggables"><div>Some content Here... JavaScript code: Now take a look at this simple code which enable drag features. Now, copy and paste this simple unobtrusive code: window.addEvent('domready', function(){ $('#draggables div').each(function(drag){ new Drag.Move(drag);}); }); Simple no?
$('#draggables div').each(function(drag) <div id="draggables"><div class="drag">Some content Here... .drag{ Text Rotation with CSS. Once again, after reading somebody else's article, I felt inspired to put together an alternative example. In this case: Text Rotation. Within the article I linked to, the example uses an image sprite and a sprinkle of CSS to get things positioned right. Well, maybe not so much a sprinkle. It's like the top fell off the pepper shaker and you've suddenly got a large pile of pepper on your food. Thankfully, many of the popular browsers of today support the ability to rotate HTML elements. <div class="example-date"><span class="day">31</span><span class="month">July</span><span class="year">2009</span></div> Nice and clean without too many extras.
The Magical CSS For Webkit and Firefox (as of 3.5), you can take advantage of the proposed transform property to handle the rotation. -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); In order to perform a transformation, the element has to be set to display:block. Filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); App Engine Java Overview - Google App Engine - Google Code. Welcome to Google App Engine for Java! With App Engine, you can build web applications using standard Java technologies and run them on Google's scalable infrastructure.
The Java environment provides a Java Servlets interface and support for standard interfaces to the App Engine scalable datastore and services, such as JDO, JPA, JavaMail, and JCache. Standards support makes developing your application easy and familiar, and also makes porting your application to and from your own servlet environment straightforward. Introduction App Engine runs your Java web application using a Java 7 JVM in a safe "sandboxed" environment.
App Engine invokes your app's servlet classes to handle requests and prepare responses in this environment. The Google Plugin for Eclipse adds new project wizards and debug configurations to your Eclipse IDE for App Engine projects. Third-party plugins are available for other Java IDEs as well. App Engine uses the Java Servlet standard for web applications. Responses.