CSS - Cascading Style Sheets

Disable mouse scroll / wheel Zoom on embedded iframe Google Maps

Web Designer / Developer usually embed Google Maps using iFrame in most websites. But, page scrolling stuck when user use mouse scroll in Google map area, and now it is working as Map zoom in/out. So, we always wonder that, "is there a way to disable the zoom via mouse scroll wheel on all of them using css or JavaScript?" Answer is "Yes", and here is powerful CSS's property - POINTER-EVENTS. For this, I am wrapping the Google map's iframe in a DIV. Default behavior of mouse in this DIV has been fixed to "pointer-events: none". It will terminate the zoom-in…
Continue Reading »
HTML

Disable landscape orientation for mobile users in responsive website

Sometimes, a responsive website looks great on Portrait orientation, but messed up on Landscape. So, a UI Developer wish to disable Landscape orientation for mobile devices (Android & iOS) before getting the website live. Before Viewport meta tag, this is always a challenge to UI Developer to show the website in correct Zoom and also doesn't allow user to Scale the website's content. But nowadays it can be easily fix with viewport. For this viewport meta tag trick please read this article. But you can't disable toggling of landscape/portrait on a mobile web app (Android Browser/iOS-Mobile Safari) through viewport meta…
Continue Reading »
HTML

Updating address bar with new URL without hash or reloading the page

Just to make it easier to understand the article, this is what Facebook does when you open a photo, for example. The url bar changes to point DIRECTLY to that photo, so you can share the URL without losing where you are in the site. Remember sites based on framing last decade? You could only get the homepage url, because only internal frames were changing. And that was terrible. How to Update Address Bar with New URL without reloading the webpage? Is there any way, I can modify the URL of the current page without reloading the page? I would…
Continue Reading »
CSS - Cascading Style Sheets

jQuery 3D CSS card flipping effect – Transform 3D

Do you play the cards game classic Solitaire? I know this is most favorite microsoft's game. Here, I am not going to discuss about this game nor it's trick. I am fan of it's 3D card flipping effect and so, here sharing how can we do this with css and jquery. For creating this 3D Card flipping effect, I have done some experimental work with CSS3 Transform (3D) rule. The transform property applies a 2D or 3D transformation to an element. This property allows you to rotate, scale, move, skew, etc., elements. I had used many transform (3D) effects in Demo. In this…
Continue Reading »
JAVASCRIPT

10 Useful Beginners JavaScript / jQuery tips and tricks

I consider myself as a advanced when it comes to coding in JavaScript or jQuery however recently I played a bit more with this language and stumbled upon a number of random things i assumed were worth sharing. As you know, JavaScript is the best programming language in the world, the language of the web, of mobile hybrid apps (like PhoneGap or Appcelerator), of the server side (like NodeJS or Wakanda) and has several other implementations. So, if you are new to JavaScript or simply don’t understand it as well as you'd like, I hope you find this article helpful. 1. 0 ==…
Continue Reading »
CSS - Cascading Style Sheets

Add style to console log statements

Searching for errors in programming code is called code debugging. Debugging is not easy. But fortunately, all modern browsers have a built-in debugger. Built-in debuggers can be turned on and off, forcing errors to be reported to the user. With a debugger, you can also set breakpoints (places where code execution can be stopped), and examine variables while the code is executing. Normally, otherwise follow the steps at the bottom of this page, you activate debugging in your browser with the F12 key, and select "Console" in the debugger menu. Have you recently checked out Google Plus because they implement some awesome effects?  I…
Continue Reading »
JAVASCRIPT

JQuery or JavaScript tricks for mobile devices like – Android, Windows, BlackBerry, Apple, iphone, ipad

JavaScript support is very good on modern mobile browsers. The mobile version of Firefox and Chrome provide pretty much desktop-level support for HTML5(CSS 3 + JavaScript + HTML 5 ) features. Most mobile phones are running some version of WebKit (what Chrome runs on), so you're pretty much guaranteed better support than IE8 provides if you're developing for mobile. Detecting Mobile Devices Instead of using jQuery you can use simple JavaScript to detect it: if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera () ) { // some code for mobile } or you can combine them both to make it more accessible through jQuery. $. =…
Continue Reading »
CSS - Cascading Style Sheets

CSS Custom Cursors

The cursor property specifies the type of cursor to be displayed when pointing on an element. Some CSS properties are animatable, meaning that they can be used in animations and transitions. Animatable properties can change gradually from one value to another, like size, numbers, percentage and color. Now, when you'd like to customize a cursor, and CSS lets you do it quite easily! Click here for a list of the cursor styles supported by the CSS W3C recommendations. Rollover on the above image and see the CSS custom Cursor   The CSS The cursor CSS property accepts a series of cursors, and using…
Continue Reading »
HTML

Find Location With HTML5 Geolocation API

The Geolocation API is a new technology that’s introduced by W3C – the same organization behind HTML5. Probably for that reason, it is often correlated and grouped with HTML5 in many books and references, although it has actually nothing to do with HTML5 technically. In this post, we are going to use the API in its simplest form; we will create a set of functions to retrieve user’s location and show it in map with Google Maps. Let’s take a look. Why Geolocation API ? In many cases, obtaining user location would be extremely useful to establish better user experience, for…
Continue Reading »
CSS - Cascading Style Sheets

Animated 3D Background Pattern using HTML5 < canvas >

Hi friends, today we are going to see a cool example of animated 3D Background using HTML5 <canvas> and javascript. The <canvas> element is part of HTML5 and allows for dynamic, script-able rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap and does not have a built-in scene graph. The <canvas> element is only a container for graphics. You must use a script to actually draw the graphics. Canvas has several methods for drawing paths, boxes, circles, text, and adding images. What is canvas element in HTML? Canvas was initially introduced…
Continue Reading »