Aligning DOM Elements around a Circle « Ben Knows Code I've been working on a project that requires elements to be positioned relative to an imaginary circle. I need to be able to support two different alignment scenarios. Both of these are illustrated below: I've added the imaginary circles as a reference for the alignment: I decided to start by figuring out where I needed to align my elements. We can any point on the circle using the following formula: (x',y')=(cx+r*cos(α),cy+r*sin(α)) Where cx and cy are the center of the circle, r is the radius, and α is the angle of the point, in radians, relative to the center of the circle. In my example, I want the elements to be evenly distributed around the circle. That's a good start but the elements are suppose to be on the perimeter of the circle and aligned to their middle/bottom point. In jQuery, I can set this via the css() function: If you noticed, I also set transform-origin to "top left" to ensure the visual top/left corner of the element shared the top/left corner in the DOM.
Building an iOS Photo-sharing and Geolocation Mobile Client and API ios mobile This article is a work in progress, or documents a feature that is not yet released to all users. This article is unlisted. Only those with the link can access it. Table of Contents Location-based mobility apps are a central part of any modern product’s strategy more than ever before. This article will guide you through the process of developing a photo sharing service with a native iOS client and Rails backend. Code for the Rails application and the iOS Client is available on GitHub. Prerequisites Basic Objective-C knowledge, including a development environment running Mac OS X with Xcode 4.2 installed. Deploy API to Heroku Because of the scope and complexity of the project being created you may find it useful to clone and deploy the code now, and use it as a reference as you read along. Write Your Rails application Following the client-server model, this guide implements both a Rails application on the server, and an iOS client that communicates with it. Deploy to Heroku .env Podfile
HeadJS, the only script in your <head> Grunt: The JavaScript Task Runner Masonry TodoMVC Getting started with PhoneGap in Eclipse for Android Note: Be sure to change the version number of the Cordova JavaScript file to match the version of PhoneGap/Cordova that you are using. Eclipse is an open source integrated development environment (IDE) that supports many technologies, but this article is focused on its support of Java, the native language for Android applications. Android is Google's open source mobile operating system. The first step in setting up your development environment for PhoneGap applications on Android is to download and install the Eclipse IDE. Android development with PhoneGap can be done in Windows, OS X, or Linux. Visit the Eclipse downloads page to download the Eclipse Classic package for your operating system. After you have downloaded and set up Eclipse, you will need to configure your environment to use Google's Android development tools. Download and configure the Android SDK The first step in configuring Android tools on your system is to download the Android SDK. Configure the ADT Plugin for Eclipse <!
20 JavaScript Frameworks Worth Checking Out | Nettuts+ The number of web applications being created and used has grown rapidly since the new millenium. And importantly, so has the sheer complexity of them -- specially on the front end. No more static pages, no sir! You have a ton of sections each interacting with each other and the server and yes, it's as complicated as it sounds and just as hard to pull off. Today, I'd like to talk about a few choice JavaScript frameworks that aim to simplify front-end application development. If you think jQuery is the answer, you lose a cookie and get an F grade! Creating responsive, fluid, and maintainable interfaces for web apps isn't as easy as one would imagine -- there is data to be sent back to the server and the results parsed, data stores to be updated, views to be re-rendered and so much else that needs to be done in the background. Sure, a few of these may be a little old but their code bases have lots of lessons to teach. Related links: Introduction to Sammy.js Github Repo Google Code
45 Fresh Useful JavaScript and jQuery Techniques and Tools Advertisement Yes, this is another round-up of fresh and useful Javascript techniques, tools and resources. But don’t close the tab yet, as you might find this one very useful. The last section also covers a number of useful educational resources such as a compilation of useful JavaScript coding practices, a detailed comparison of JavaScript frameworks and general JavaScript programming conventions. You may be interested in the following related posts: Calendars and Timelines jDigiClock – Digital Clock (HTC Hero inspired)4 jDigiClock is a jQuery plugin inspired from HTC Hero Clock Widget. jQuery Sliding Clock v1.15 jQuery transpearant Slider clock with CSS sprites. Date / Time Picker6 Note that this control is not designed to work in IE6; although it will function correctly in most cases, the positioning of the calendar may be way off depending on how your page is styled. JavaScript Debugging and Validation Tools Forms, Buttons & Navigation Layout tools Useful jQuery Plugins Flip! Related Posts