jQuery Image Gallery

I was asked to create a simple jQuery routine that could replace a current flash control. The challenge was not actually the jQuery portion but creating the HTML dynamically. The current code create a XML file that was passed to a flash object. Once the HTML was dynamically created, the jQuery was pretty easy.

Here is a sample of what I created:

<html>
    <!--
        Author:  Andrew Pallant
        Date:    July 2013

        Image Gallery jQuery Code - Created for a client to replace a flash solution.
        Code has been dumbed down for sample purposes.  Actually HTML code is more dynamic, but the jQuery code is the same no mater what.
    -->
    <head>
        	<script type="text/javascript">
            jQuery(document).ready(function () {
                // Initialize Controls
                jQuery("[id^=imgBig]").hide();

                // Set Mouse Over Events
                jQuery("[id^=thumb]").mouseover(function () { jQuery(this).fadeTo(0, 0.6); });
                jQuery("[id^=thumb]").mouseout(function () { jQuery(this).fadeTo(0, 1); });

                // Set Thumb Indexed Values
                for (var x = 0; x < 7; x++) {
                    jQuery("#thumb" + x).attr('indexedVal', x);
                }

                // Thumb Click Events
                jQuery("[id^=thumb]").click(function () {
                    jQuery("[id^=imgBig]").hide();

                    jQuery("#imgBig" + jQuery(this).attr('indexedVal')).fadeIn("Slow");
                });

                // Set Initial Image
                jQuery("#imgBig0").show();
            });
        </script>
    </head>

    <body>
        <div class="imgGallery">
	        <div class="BigImageContainer">
		        <img id='imgBig0' src='image1.jpg' />
		        <img id='imgBig1' src='image2.jpg' />
		        <img id='imgBig2' src='image3.jpg' />
		        <img id='imgBig3' src='image4.jpg' />
	        </div>
	        <div class="thumbCtrl">
		        <ul>
		            <li class="thumb">
			            <a href="#" onclick="return false;"><img id='thumb0' src='image1.jpg' /></a>
		            </li>
		            <li class="thumb">
			            <a href="#" onclick="return false;"><img id='thumb1' src='image2.jpg' /></a>
		            </li>
		            <li class="thumb">
			            <a href="#" onclick="return false;"><img id='thumb2' src='image3.jpg' /></a>
		            </li>
		            <li class="thumb">
			            <a href="#" onclick="return false;"><img id='thumb3' src='image4.jpg' /></a>
		            </li>
		        </ul>
	        </div>
        </div>

    </body>

</html>
photo gallery
Sample Image of the Gallery of what it could look like: currently being used on www.SoftwareCity.ca and www.pc-canada.com

Image of Finished Product

How to use SQL to Extract a Number from a String

Recently I had a need to extract the number from a string in the database.  The string would be something like ‘Monitor 16″‘ or “16 inch Monitor”.   I would need to get the size for various reasons including fees and reports, but no real good way of doing it.  I have come up with the following Scalar SQL Function to do this very job.

Continue reading How to use SQL to Extract a Number from a String

Letter of Gratitude and Kudos to People Who Helped Me

Kevin Douglas, Wayne Thayer and Jas Romain all assisted me with designing the Breaking the ICE Conference website. This conference is about empowering
by breaking down the communication barriers and is a very good cause. I give kudos to these gentleman as they helped me with the design and the ideas. I have attached the letter of gratitude for all to read.

Continue reading Letter of Gratitude and Kudos to People Who Helped Me

MaxMind GEOIP Look-up for Microsoft SQL

Recently I implemented a GEOIP solution on a client site; however, the site was built on a Microsoft SQL database engine and I could not find a solution for looking up the country name easily.  Through some quick Google searches I had tripped on the site for which I started at ( http://dev.maxmind.com/geoip/csv ).  The site maxmind.com gave me the MySQL solution and the mathematical solution for creating the integer.  Based on this information, I created my own function in MS SQL to retrieve me the calculated IP integer for easier use.

Continue reading MaxMind GEOIP Look-up for Microsoft SQL

SEO Analysis – Turning a Large Ship Around

Sometimes it is like turning a large ship around; SEO can be hard to turn around if the site is degraded.  You need time and room to work.  Most importantly you need to have a plan.

I have been working very hard for one of my clients to turn their site around.  There is no budget for any SEM; so it is purely site structure and other basic SEO practices.

I began with some SEO Analysis using several free tools, some code, speed and structure reviews and some client interviews of where they would like to take it.

Continue reading SEO Analysis – Turning a Large Ship Around

Cha-Cha-Changes

SEO – Mobile – Web – Social Media –

These are technologies and concepts that need to be utilized in everyday business life. Just because you have been doing the same thing for the past dozen years does not mean it will work for the next dozen years. You have a story to tell and SEO, Mobile, Web and Social Media are the concepts and technology that can help you bring life back to your story. Continue reading Cha-Cha-Changes