Github URL: https://github.com/hasinhayder/Nanimator Live Demo: http://hasinhayder.github.io/Nanimator/index2.html I got the idea of Nanimator Library while working with jQuery Transit library and CSS3 transforms couple od days ago. I was chaining the animation of numbers of objects by writing callbacks for each of them and suddenly I … Continue reading Introducing Nanimator Library – for Nano Animations
Tag: jQuery
CSS3 Storyline Animation using jQuery Transit Library
I have been learning CSS3 animations and transitions for last few days, and I found this awesome jQuery library “Transit” which can be used to replace CSS3 @KeyFrame animations. I am not a big fan of KeyFrame animations because it’s tough to write and you need to calculate a lot of things and express them in percentage of total time. Which makes it even harder to write. I mean for something small, it is more than awesome – but as soon you start writing something big, where each elements are chained to each other, you will find it pretty tough.
So, here goes the CSS3 Storyline Animation using jQuery Transit library. There are many sliders in the market who uses animations like this – so if you are good, you can even make a animation designer app using Transit.
Github URL: https://github.com/hasinhayder/CSS3-Storyline-Animation
Live Demo: http://bit.ly/CSS3Storyline
Utopia – our new admin panel theme is ready to grab
Last week, we have released a new admin panel theme from themio. This new theme, “Utopia” comes packed with lots of beautifully crafted UI elements and it is built on top of popular twitter bootstrap framework. So you will be getting all the features of twitter bootstrap plus the extras.
Check Utopia in Themeforest: Click here
Utopia comes with two themes white and dark which will suit your need in different situations. The collapsible sidebar and widgets, data tables, conversations tables, pricing tables and numbers of galleries with image effect will make it a perfect choice for the backend of your web applications
Screenshots
Dashoboard comes with a glimpse of beautifully crafted UI elements that comes with Utopia. The collapsible and
responsive
sidebar, data tables, legends, weather controls, data tables, news feed ticker and many more
Dashboard
A tiny, open source Flickr Portfolio application
I have created a Flickr Portfolio application which can be linked to your Flickr account, display all your latest Flickr photos and incorporate Facebook like and comments with it.
This application is small, simple and code is well formatted so that you can edit it. All the instructions are provided in the readme.txt file and you can edit the settings in config.php file and instantly get a portfolio live 🙂
To download the source code, please go to http://photography.ofhas.in and find the download link in the footer.
This application is completely free, open source and you don’t even have to give any attribution to me at all 🙂
Download: http://photography.ofhas.in and find the download link in the footer
Enjoy!
jShutterBox plugin for some cool animation + content display, together
jShutterBox is a jQuery plugin I have developed two or three months ago. But I didnt release it because It was complex and users had to supply content for every animated images. Though it was ok with me that time, but last week I thought that I could make it even simpler to use. For example, just a <div> containing an image and an anchor can be converted into an animated content box 🙂
to use jShutterBox is simple. Just download the package from Box.net, include jshutterbox.js in your page, and run the following code 🙂
[sourcecode lang=”html”]
<div class="animated">
<img src="http://scripts.ofhas.in/jshutterbox/images/image2.jpg"/>
<a href="http://leevio.com" title="Leevio">Welcome to Leevio</a>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(".animated").jShutterBox({slide:"random"});
});
</script>
[/sourcecode]
You can configure other options, like “height”, “width”, “duration”, “borderWidth”, “borderColor”, “slide”. You can pass “random” as a value of “slide” to see the random animation. You can also specify any value of the “up,”down”,”left”,”right”,”up-left”,”up-right”,”down-left”,”down-right”for “slide” to see any specific animation too 🙂
You can view the demo at http://scripts.ofhas.in/jshutterbox/demo.html
I hope you will like it 🙂 – by the way, this plugin depends on jQuery Easing plugin.
Download jShutterBox from DropBox
Shameless Note 🙂 : By the way, if you are looking for a beautiful Admin Panel Theme for your PHP based projects/web-applications, you may want to check out Chameleon Circuit, which is developed by our Themio Team 🙂
Add flexible configuration panel to DOM Elements with jQConfigurator jQuery Plugin
If you hover mouse over your Facebook profile, you will notice a nice configuration panel appears at the top right corner of your profile picture, saying “Change Picture”
Now if you want to add nice and flexible configuration panels like this to your DOM container elements like
you can do it easily with jQConfigurator jQuery plugin. This plugin allows you to add text or images based panel items and manage their “click” events easily. Here is a screenshot of what it will look like, once addedOr may be one like this
For an extensive documentation and working demo + download, check the jQConfigurator plugin from http://scripts.ofhas.in/jqconfigurator . jQConfigurator is released under New BSD license.
My slide from SQABD LightningTalks4
As like before, LightningTalks4 arranged by SQABD was really great this time. This time it was sponsored by bGlobal Sourcing and I really enjoyed a nice evening with all the techy geeks after a long time 🙂
I presented my session on “BanglaInput Manager, jQuery Plugin” and you can download the slides from the following two links
1. http://www.box.net/shared/2tigrtdh1p
or
2. http://dl.dropbox.com/u/5396928/SQABD-LT4-BanglaInputManager.pptx
You can visit the demo plugin at http://scripts.ofhas.in/bim/
Thanks for being there. It was nice to meet you all.
jQuery:hooking form submit and making it ajax request
modern javascript frameworks are big blessings to every front end developer. they made our life so much easier so that we can sleep more and become fat day by day 😀 – i am a big fan of jQuery and mootools.
in this post i am going to show you how you can hook a normal form submission process, regardless of it’s method GET or POST, and convert it into an ajax request. the whole process will work dynamically. it will parse form input elements, make a JSON array from them and make an ajax request to the appropriate action url. after that, it will invoke the user supplied callback function.
problem 1: parsing form elements was a small challenge. you can do it in various way (by traversing or serialize or using css selectors). i choose to use serializer routines. jQuery has builtin support for two types of serializing , one is $(form).serialize() and another is $(form).serializeArray(). lets have a look at the output of both of them for the following form
[sourcecode lang=”html”]
<form id="f1" action=’some target’ method=’POST’>
<input type ="textbox" id=’username’ name =’username’ value=’me’/>
<input type ="checkbox" value=1 id=’guests’ name =’guests’/>
</form>
[/sourcecode]
now lets check the output by both serialize() and serializeArray() method
[sourcecode lang=”javascript”]
alert ($(‘#f1’).serialize());
//output is "username=me&guests=1"
alert($(‘#f1’).serializeArray()
//output is [{object},{object}]
[/sourcecode]
are you scared seeing this [object] output of serializeArray()? well dont panic. serializeArray() returns a JSON structure. you can still investigate using toSource() method
[sourcecode lang=”javascript”]
alert($(‘#f1’).serializeArray().toSource()
//output is [{"username":"me"},{"guests":"1"}]
[/sourcecode]
but that will not be usable to send in our AJAX request. we need a JSON array key/value pair (or you can use the output of serialize() function too to send as data in ajax request, the serilizeForm part is completely optional )
lets create a new function called serializeForm which will create JSON key/value pair out of serializeArray() and do the rest of the work.
[sourcecode language=”javascript”]
$.fn.serializeForm = function()
{
data = {};
url = this.attr("action");
items = this.serializeArray();
$.each(items,function(i,item)
{
data[item[‘name’]]=item[‘value’];
}
);
return data;
}
[/sourcecode]
now lets hook the normal submit process of the form using the following hook
[sourcecode lang=”javascript”]
function submitHook(form, callback)
{
$(form).submit(function(e){
items = {};
items = $(form).serializeForm();
url = $(form).attr("action");
if(""==url)
{
alert("Cannot submit form. No action specified");
return false;
}
callback = callback?callback:function(){};
$.post(url,items,callback);
return false;
});
}
[/sourcecode]
now you can just hook the form simply by this
[sourcecode lang=”javascript”]
ourCallback = function (data)
{
alert(data);
}
submitHook($(‘#f1’),ourCallback);
[/sourcecode]
happy jQuerying 🙂
Cropping any part of any website – thats fun!
after seeing the excellent jCrop this evening, i was thinking how to use it fro cropping any part of any website. Using a little bit CSS and Iframe – you can simulate the cropping of any webpage and thats what I did this evening
check out http://sandbox.ofhas.in/pagecrop/ – type any url in the “Url” box, load it and then select any part of it (that part is done using jCrop) – and then click “crop selection” – tada!
you can use this technology to add any particular part of any website to your website. it is done using javascript (jQuery and jCrop)- no PHP at all 🙂
check it out – you will definitely enjoy it 🙂