Vasiliy Selivanov

  • RSS

Flex SDK coding conventions and best practices

Posted on Friday, April 18th, 2008

Introduction This document lays out the coding standards for writing open-source Flex framework components in ActionScript 3. Adhering to these standards makes the source code look consistent, well-organized, and professional. Some of these standards are completely arbitrary, since there is not always a “best way” to code. Nevertheless, in the interest of consistency, all commits [...]

continue reading

Multiple File Upload plugin for jQuery and Cancel button

Posted on Thursday, November 20th, 2008

QuocKien here ask me to help him with Multiple File Upload plugin and cancel button This the most easy way I think it’s this simple js code (cancel button will work for second multi input file) 12345678910$(document).ready(function(){         $(‘.multi’).MultiFile();         $(‘.multi2′).MultiFile();                 [...]

continue reading

Google App Engine

Posted on Tuesday, April 8th, 2008

New google service http://code.google.com/appengine/ Google App Engine lets you run your web applications on Google’s infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it’s ready [...]

continue reading

Simple JQuery slide show

Posted on Friday, March 27th, 2009

For example you have couple of photos with this html

1
2
3
4
5
6
7
8
9
10
<div id="photos">
  <ul>
         <li><img src="/img/1.jpg" /></li>
         <li><img src="/img/2.jpg" /></li>
         <li><img src="/img/3.jpg" /></li>
         <li><img src="/img/4.jpg" /></li>
         <li><img src="/img/5.jpg" /></li>
         <!-- any count you want -->
  </ul>
</div>

first you need it add style

1
2
3
#photos ul li {
    display:none;
}

load jquery library and add my simple code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$(function(){

    $('#photos ul li:first').show(); // display first photo

    changePhoto = function() {
        index = 0;
        return function() {
            active = $("#photos ul li:eq("+index+")");
            index++;
            el = $("#photos ul li:eq("+index+")");
            if(!el.length) {
                index = 0;
            }
            $(active).fadeOut("slow",function() {
                $("#photos ul li:eq("+index+")").fadeIn("slow");
            });
        }
    }
    intId = setInterval(changePhoto() , 6000); // set interval for changing photo to 6 sec

});

See preview below

  • slide show
  • slide show
  • slide show
  • slide show
  • slide show

Posted in: jQuery.