<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Avivo Tech Blog &#187; HTML, Javascript and CSS</title>
	<atom:link href="http://tech.avivo.si/category/html-javascript-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.avivo.si</link>
	<description>Solving problems</description>
	<lastBuildDate>Tue, 24 Jan 2012 14:46:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>The easiest way to generate a QR Code for software developers</title>
		<link>http://tech.avivo.si/2012/01/the-easiest-way-to-generate-a-qr-code-for-programmers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-easiest-way-to-generate-a-qr-code-for-programmers</link>
		<comments>http://tech.avivo.si/2012/01/the-easiest-way-to-generate-a-qr-code-for-programmers/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 14:46:11 +0000</pubDate>
		<dc:creator>developer</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Silverlight/WPF]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[qr code generators]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1445</guid>
		<description><![CDATA[So you want to simply generate a QR Code image without diving into the technical specifics? This blog post contains a few simple examples. Just copy-paste where you need it. Idea is to build a URL, make an HTTP request and download the QR Code image. Result is the following image: HTTP Request URL looks [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to simply generate a QR Code image without diving into the technical specifics? This blog post contains a few simple examples. Just copy-paste where you need it.</p>
<p>Idea is to build a URL, make an HTTP request and download the QR Code image. Result is the following image:</p>
<pre><img src="http://www.esponce.com/api/v3/generate?content=your%20content%20goes%20here&#038;format=png" alt="your content goes here" /></pre>
<h2>HTTP Request</h2>
<p>URL looks like<strong> http://www.esponce.com/api/v3/generate?content={content}&amp;format={format}</strong> where <strong>{content}</strong> is URL encoded content to be embedded in QR and <strong>{format}</strong> is output image format. Available formats are <strong>png, jpg, bmp, tif, xaml, svg, eps, txt, html, zip</strong> (containing all listed formats)</p>
<p>List of other parameters like color and size can be found <a href="http://www.esponce.com/help/api-v3/generate#parameters">here</a>.</p>
<h2>C# Sample</h2>
<p>This code can be used in <strong>.NET 2.0</strong> including ASP.NET and WPF or <strong>Silverlight</strong> for web or <strong>WP7</strong></p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.IO;
using System.Web;
using System.Net;

public class Program
{
  public static void Main(string[] args)
  {
    //Generate a QR Code and save it to file &quot;sample.png&quot;
    Generate(&quot;your content goes here&quot;, &quot;png&quot;, &quot;sample.png&quot;);
  }

  public static void Generate(string content, string format, string path)
  {
    string encoded = HttpUtility.UrlEncode(content);
    Uri uri = new Uri(&quot;http://www.esponce.com/api/v3/generate?content=&quot; + encoded + &quot;&amp;format=&quot; + format);
    WebClient client = new WebClient();
    client.DownloadFile(uri, path);
  }
}
</pre>
<h2>Java Sample</h2>
<p>This code can be used in a classic <strong>Java</strong> application or web <strong>applet</strong> or <strong>Android</strong> application</p>
<pre class="brush: java; title: ; notranslate">
import java.io.*;
import java.net.*;

public class qrcode
{
  public static void main(String args[])
  {
    //Generate a QR Code image and save it to file &quot;sample.png&quot;
    generate(&quot;your content goes here&quot;, &quot;png&quot;, &quot;sample.png&quot;);
  }

  public static void generate(String content, String format, String path)
  {
    try
    {
      String encoded = URLEncoder.encode(content, &quot;UTF-8&quot;);
      String url = &quot;http://www.esponce.com/api/v3/generate?content=&quot; + encoded + &quot;&amp;format=&quot; + format;
      BufferedInputStream ins = new BufferedInputStream(new URL(url).openStream());
      FileOutputStream fos = new FileOutputStream(path);
      BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);

      int size = 0;
      byte data[] = new byte[1024];
      while ((size = ins.read(data, 0, 1024)) &amp;gt; 0)
      {
        bos.write(data, 0, size);
      }

      bos.close();
      fos.close();
      ins.close();
    }
    catch (Exception e)
    {
    }
  }
}
</pre>
<h2>Python Sample</h2>
<p>Using Python 2.7</p>
<pre class="brush: python; title: ; notranslate">
#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import urllib
import httplib

def generate(content, format = &quot;png&quot;):
    query = urllib.urlencode({ &quot;content&quot;: content, &quot;format&quot;: format })
    con = httplib.HTTPConnection(&quot;www.esponce.com&quot;)
    con.request(&quot;GET&quot;, &quot;/api/v3/generate?&quot; + query)
    response = con.getresponse()
    image = response.read()
    con.close()
    return image

image = generate(&quot;your content goes here&quot;)
file = open(&quot;sample.png&quot;, &quot;wb&quot;)
file.write(image)
file.close()
</pre>
<h2>JavaScript Sample</h2>
<p>JavaScript in combination with HTML</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;img id=&quot;qrcode&quot; src=&quot;&quot; alt=&quot;QR Code&quot; /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    function generate(content)
    {
        var url = &quot;http://www.esponce.com/api/v3/generate?content=&quot; + encodeURI(content) + &quot;&amp;format=png&quot;;
        var img = document.getElementById(&quot;qrcode&quot;);
        img.src = url;
    }
    generate(&quot;your content goes here&quot;);
&lt;/script&gt;
</pre>
<h2>PHP Sample</h2>
<pre class="brush: php; title: ; notranslate">
&lt;img src=&quot;&lt;?php echo generate(&quot;your content goes here&quot;); ?&gt;&quot; alt=&quot;QR Code&quot; /&gt;

&lt;?php
function generate($content, $format = &quot;png&quot;)
{
    $encoded = urlencode($content);
    $url = &quot;http://www.esponce.com/api/v3/generate?content=$encoded&amp;format=$format&quot;;
    return $url;
}
?&gt;
</pre>
<h2>There is more</h2>
<p>Download all samples with <em>make</em> script <a href="http://tech.avivo.si/wp-content/uploads/2012/01/generate-qr-code-samples-src.zip">here</a>.</p>
<p>Other QR Code related methods like decoding (reverse process of generating) and tracking scans can be found at <a href="http://www.esponce.com/help">esponce.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2012/01/the-easiest-way-to-generate-a-qr-code-for-programmers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Very cool! Create TRIANGLE in HTML with CSS</title>
		<link>http://tech.avivo.si/2011/08/very-cool-create-triangle-in-html-with-css/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=very-cool-create-triangle-in-html-with-css</link>
		<comments>http://tech.avivo.si/2011/08/very-cool-create-triangle-in-html-with-css/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 10:46:55 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[shape]]></category>
		<category><![CDATA[triangle]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1367</guid>
		<description><![CDATA[.triangle { border-bottom: 100px solid #FC2E5A; border-left: 50px solid transparent; border-right: 50px solid transparent; height: 0; width: 0; } .infinity { position: relative; width: 212px; height: 100px; } .infinity:before, .infinity:after { content: ""; position: absolute; top: 0; left: 0; width: 60px; height: 60px; border: 20px solid #fc2e5a; -moz-border-radius: 50px 50px 0 50px; border-radius: 50px 50px [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
.triangle {
border-bottom: 100px solid #FC2E5A;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
height: 0;
width: 0;
}
.infinity {
    position: relative;
    width: 212px;
    height: 100px;
}
.infinity:before,
.infinity:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;    
    border: 20px solid #fc2e5a;
    -moz-border-radius: 50px 50px 0 50px;
         border-radius: 50px 50px 0 50px;
    -webkit-transform: rotate(-45deg);
       -moz-transform: rotate(-45deg);
        -ms-transform: rotate(-45deg);
         -o-transform: rotate(-45deg);
            transform: rotate(-45deg);
}
.infinity:after {
    left: auto;
    right: 0;
    -moz-border-radius: 50px 50px 50px 0;
         border-radius: 50px 50px 50px 0;
    -webkit-transform:rotate(45deg);
       -moz-transform:rotate(45deg);
        -ms-transform:rotate(45deg);
         -o-transform:rotate(45deg);
            transform:rotate(45deg);
}
</style>
<h2>Triangle in pure HTML/CSS</h2>
<div class="triangle"></div>
<h2>Infinity in pure HTML/CSS</h2>
<div class="infinity"></div>
<div style="margin-top: 25px; margin-bottom: 25px;">So, this is the CSS for triangle:</div>
<pre>.triangle {
    border-bottom: 100px solid #FC2E5A;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    height: 0;
    width: 0;
}</pre>
<div style="margin-top: 25px; margin-bottom: 25px;">
All other <a title="Custom shapes in HTML" href="http://3easy.org/buildmobile/jquerymobile/" target="_blank">custom shapes</a>!
</div>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2011/08/very-cool-create-triangle-in-html-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Textbox or Textarea with padding and 100% width and horizontal scroller</title>
		<link>http://tech.avivo.si/2011/06/html-textbox-or-textarea-with-padding-and-100-width-and-horizontal-scroller/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=html-textbox-or-textarea-with-padding-and-100-width-and-horizontal-scroller</link>
		<comments>http://tech.avivo.si/2011/06/html-textbox-or-textarea-with-padding-and-100-width-and-horizontal-scroller/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 13:36:58 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[100% width]]></category>
		<category><![CDATA[horizontal scroller]]></category>
		<category><![CDATA[overflow]]></category>
		<category><![CDATA[padding]]></category>
		<category><![CDATA[textarea]]></category>
		<category><![CDATA[textbox]]></category>
		<category><![CDATA[Textbox or Textarea with padding and 100% width and horizontal scroller]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1332</guid>
		<description><![CDATA[If you have a HTML textarea or textbox and give them 100% width and if these elements have padding then total width will be 100% + padding which is not wanted behaviour and you will get horizontal scroller. In order to make it behave properly add this CSS styles to your textbox/textarea: box-sizing: border-box; -webkit-box-sizing:border-box; [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a HTML <strong>textarea </strong>or <strong>textbox </strong>and give them <strong>100% width</strong> and if these elements have <strong>padding </strong>then total width will be <strong>100% + padding</strong> which is not wanted behaviour and you will get <strong>horizontal scroller</strong>.<br />
In order to make it behave properly add this CSS styles to your textbox/textarea:</p>
<pre class="css">box-sizing: border-box;
-webkit-box-sizing:border-box;
-moz-box-sizing: border-box;</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2011/06/html-textbox-or-textarea-with-padding-and-100-width-and-horizontal-scroller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QR Codes API &#8211; automatically generated for given content</title>
		<link>http://tech.avivo.si/2011/05/qr-codes-api-automatically-generated-for-given-content/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=qr-codes-api-automatically-generated-for-given-content</link>
		<comments>http://tech.avivo.si/2011/05/qr-codes-api-automatically-generated-for-given-content/#comments</comments>
		<pubDate>Mon, 16 May 2011 18:31:05 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[Programming Techniques]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Social networks]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[barcode]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[qr code generators]]></category>
		<category><![CDATA[qr codes]]></category>
		<category><![CDATA[qrcode]]></category>
		<category><![CDATA[scanner]]></category>
		<category><![CDATA[smart phones]]></category>
		<category><![CDATA[social networks]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1318</guid>
		<description><![CDATA[There are a lot of  QR Code generators on a web and there is also listed our generator &#8211; available at http://qrcode.good-survey.com It already went over simple generator functionality and new features are adding. Basically, beside QR Code generation, we are offering as addition: Tracking of generated QR Codes &#8211; for marketing managers ti know [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of  <a title="QR Code generators" href="http://2d-code.co.uk/qr-code-generators/" target="_blank">QR Code generators</a> on a web and there is also listed our generator &#8211; available at <a title="Good Survey QR Code Generator and Tracking" href="http://qrcode.good-survey.com" target="_blank">http://qrcode.good-survey.com</a></p>
<p>It already went over simple generator functionality and new features are adding.</p>
<div id="attachment_1325" class="wp-caption alignnone" style="width: 710px"><img class="size-large wp-image-1325" title="QR Codes Generator and API" src="http://tech.avivo.si/wp-content/uploads/2011/05/qr-codes-generator-and-api-700x475.jpg" alt="QR Codes Generator and API" width="700" height="475" /><p class="wp-caption-text">QR Codes Generator and API</p></div>
<p>Basically, beside QR Code generation, we are offering as addition:</p>
<ul>
<li>Tracking of generated QR Codes &#8211; for marketing managers ti know which locations work best (i.e. posters with printed QR Code)</li>
<li>Dynamic QR Codes &#8211; if some QR Code is already printed you can make it point to completely different URL without changing the printed code</li>
<li>Adding your logo inside QR Code (with readability testing) &#8211; branding feature</li>
<li>All types of content are supported (hyperlinks, custom text, vCard, Bizcard, Mecard,  vCalendar, social networks &#8211; Twitter, Facebook, YouTube, Geo locations and maps, SMS messages, phones,&#8230;)</li>
<li>Strong use of API &#8211; automating generation process and possibility to use from your application/website &#8211; this is what we will talk about a little bit more in this article&#8230;</li>
</ul>
<p>Using API is not complicated at all, <a title="QR Codes API" href="http://qrcode.good-survey.com/help" target="_blank">we wrote a tutorial</a> which is easy to understand.</p>
<p>Here is an example how you can have instantly QR Code image on your website:</p>
<p>This are direct links:</p>
<ul>
<li><a href="http://qrcode.good-survey.com/api/v2/generate?content=Hello%20World&amp;format=png&amp;padding=2&amp;size=10&amp;em=byte&amp;ec=m" target="_blank">Hello World custom text</a></li>
<li><a href="http://qrcode.good-survey.com/api/v2/generate?content=http%3a%2f%2fmaps.google.com%2fmaps%3ff%3dq%26q%3d46.043286%2c14.492791300000022%26q%3d30%2bTeslova%2bUlica%252c%2bLjubljana%2b1000%252c%2bSlovenia&amp;format=png&amp;padding=2&amp;size=10&amp;em=byte&amp;ec=m" target="_blank">Google Maps location of company&#8217;s office</a></li>
<li><a href="http://qrcode.good-survey.com/api/v2/generate?content=http%3a%2f%2fqrcode.good-survey.com&amp;format=png&amp;padding=2&amp;size=10&amp;em=byte&amp;ec=m" target="_blank">QR Code generator URL</a></li>
</ul>
<p>This how it could look like inside your website (just put this hyperlink inside your IMG tag)</p>
<pre lang="csharp">&lt;img src="http://qrcode.good-survey.com/api/v2/generate?content=
http%3a%2f%2fmaps.google.com%2fmaps%3ff%3dq%26q%3d46.043286%2c14.492791300000022%
26q%3d30%2bTeslova%2bUlica%252c%2bLjubljana%2b1000%252c%2bSlovenia&amp;
format=png&amp;padding=2&amp;size=10&amp;em=byte&amp;ec=m" alt="Avivo location" /&gt;</pre>
<div style="margin-top:20px;">
Try it also by yourself &#8211; just download <a title="QR Codes API demo application" href="http://qrcodeapi.codeplex.com/" target="_blank">DEMO API application</a> from CodePlex and you can play with supported API features.</div>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2011/05/qr-codes-api-automatically-generated-for-given-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery problem with attr(&#8220;value&#8221;)</title>
		<link>http://tech.avivo.si/2011/03/jquery-problem-with-attr-value/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-problem-with-attr-value</link>
		<comments>http://tech.avivo.si/2011/03/jquery-problem-with-attr-value/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 14:10:23 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[attr("value")]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery error]]></category>
		<category><![CDATA[jquery get attribute value]]></category>
		<category><![CDATA[jquery problem with attr("value")]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1228</guid>
		<description><![CDATA[We experienced a problem using attr(&#8220;value&#8221;) JQuery function when selecting values that are not integers. So if you have: &#60;ul&#62; &#60;li id="li1" value="1"&#62;One&#60;/li&#62; &#60;li id="li2" value="2"&#62;Two&#60;/li&#62; &#60;li id="li3" value="3"&#62;Three&#60;/li&#62; &#60;li id="li4" value="4"&#62;Four&#60;/li&#62; &#60;/ul&#62; It is working OK. $(function() { alert($('#li2').attr('value')); }); But if you have (string as values instead of integers): &#60;ul&#62; &#60;li id="li1" value="One"&#62;One&#60;/li&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>We experienced a problem using <strong>attr(&#8220;value&#8221;)</strong> JQuery function when selecting values that are not integers.</p>
<h3><strong>So if you have:</strong></h3>
<pre class="html">  &lt;ul&gt;
    &lt;li id="li1" value="1"&gt;One&lt;/li&gt;
    &lt;li id="li2" value="2"&gt;Two&lt;/li&gt;
    &lt;li id="li3" value="3"&gt;Three&lt;/li&gt;
    &lt;li id="li4" value="4"&gt;Four&lt;/li&gt;
  &lt;/ul&gt;
</pre>
<h3><strong>It is working OK.</strong></h3>
<pre class="jscript">  $(function() {
    alert($('#li2').attr('value'));
  });
</pre>
<h3><strong>But if you have (string as values instead of integers):</strong></h3>
<pre class="html">  &lt;ul&gt;
    &lt;li id="li1" value="One"&gt;One&lt;/li&gt;
    &lt;li id="li2" value="Two"&gt;Two&lt;/li&gt;
    &lt;li id="li3" value="Three"&gt;Three&lt;/li&gt;
    &lt;li id="li4" value="Four"&gt;Four&lt;/li&gt;
  &lt;/ul&gt;
</pre>
<h3><strong>This is not working.</strong></h3>
<pre class="jscript">  $(function() {
    alert($('#li2').attr('value'));
  });
</pre>
<h3><strong>Solution (rename value attribute to something else):</strong></h3>
<pre class="html">  &lt;ul&gt;
    &lt;li id="li1" tag="One"&gt;One&lt;/li&gt;
    &lt;li id="li2" tag="Two"&gt;Two&lt;/li&gt;
    &lt;li id="li3" tag="Three"&gt;Three&lt;/li&gt;
    &lt;li id="li4" tag="Four"&gt;Four&lt;/li&gt;
  &lt;/ul&gt;
</pre>
<h3><strong>This is now OK.</strong></h3>
<pre class="jscript">  $(function() {
    alert($('#li2').attr('tag'));
  });
</pre>
<h3><strong>Conclusion:</strong></h3>
<p>Do not use reserved attributes as your custom attributes (where HTML element does not support them).</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2011/03/jquery-problem-with-attr-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create your own JQuery function</title>
		<link>http://tech.avivo.si/2011/02/create-your-own-jquery-function/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-own-jquery-function</link>
		<comments>http://tech.avivo.si/2011/02/create-your-own-jquery-function/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 18:05:21 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[custom jquery function]]></category>
		<category><![CDATA[extend jquery function]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[user defined jquery fucntions]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1217</guid>
		<description><![CDATA[As written in this article &#8230; $.fn.myFunction = function() { return $(this).addClass('changed'); } And now, use it like this: $('.changePlease').myFunction();]]></description>
			<content:encoded><![CDATA[<p>As written in <a href="http://jquery-howto.blogspot.com/2008/12/how-to-add-your-own-custom-functions-to.html" target="_blank">this article</a> &#8230;</p>
<pre class="jscript">
$.fn.myFunction = function()
{
  return $(this).addClass('changed');
}
</pre>
</p>
<p>And now, use it like this:</p>
<pre class="jscript">
$('.changePlease').myFunction();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2011/02/create-your-own-jquery-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to select first and last child / element with JQuery</title>
		<link>http://tech.avivo.si/2011/02/how-to-select-first-and-last-child-element-with-jquery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-select-first-and-last-child-element-with-jquery</link>
		<comments>http://tech.avivo.si/2011/02/how-to-select-first-and-last-child-element-with-jquery/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 23:03:52 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[get first and last child with jquery]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[select first and last child]]></category>
		<category><![CDATA[select first and last item in list with jquery]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1212</guid>
		<description><![CDATA[&#60;ul class="menu"&#62; &#60;li class="page_item"&#62;First Item&#60;/li&#62; &#60;li class="page_item"&#62;Second Item&#60;/li&#62; &#60;li class="page_item"&#62;Third Item&#60;/li&#62; &#60;li class="page_item"&#62;Last Item&#60;/li&#62; &#60;/ul&#62; &#60;script type="text/javascript"&#62; $(function() { //Add css classes to first and last item in the html list $('ul.menu li:first-child').addClass('first_item'); $('ul.menu li:last-child').addClass('last_item'); }); &#60;/script&#62;]]></description>
			<content:encoded><![CDATA[<pre class="jscript">
&lt;ul class="menu"&gt;
  &lt;li class="page_item"&gt;First Item&lt;/li&gt;
  &lt;li class="page_item"&gt;Second Item&lt;/li&gt;
  &lt;li class="page_item"&gt;Third Item&lt;/li&gt;
  &lt;li class="page_item"&gt;Last Item&lt;/li&gt;
&lt;/ul&gt;

&lt;script type="text/javascript"&gt;
  $(function()
  {
    //Add css classes to first and last item in the html list
    $('ul.menu li:first-child').addClass('first_item');
    $('ul.menu li:last-child').addClass('last_item');
  });
&lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2011/02/how-to-select-first-and-last-child-element-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript alert (message) box alternative</title>
		<link>http://tech.avivo.si/2011/01/javascript-alert-message-box-alternative/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=javascript-alert-message-box-alternative</link>
		<comments>http://tech.avivo.si/2011/01/javascript-alert-message-box-alternative/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 10:51:21 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[alert alternative]]></category>
		<category><![CDATA[alternative to alert message]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[message box alternative]]></category>
		<category><![CDATA[replace system message box in javascript]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1138</guid>
		<description><![CDATA[If you want to quick test some functionality in JavaScript (fast clicking) then classic alert function is not a solution. You can use this print function to simulate alert function. It writes message to a div, and if you want multiple divs just comment the code where existing div is reused. Example od use: print('your [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to quick test some functionality in JavaScript (fast clicking) then classic <strong>alert </strong>function is not a solution.<br />
You can use this <strong>print </strong>function to simulate <strong>alert </strong>function. It writes message to a <strong>div</strong>, and if you want multiple <strong>divs </strong>just comment the code where existing <strong>div </strong>is reused.</p>
<div style="margin-top:40px;"> </div>
<p>Example od use:</p>
<pre class=javascript>
print('your message', 'message box title');
</pre>
<div style="margin-top:40px;"> </div>
<div style="margin-top:40px;"> </div>
<pre class=javascript>
function print(txt, title)
{
  txt = txt.replace(/\n/g,"&lt;br /&gt;");
  if(!title) var title = "Message title";
  var template = "&lt;center&gt;&lt;div id='message_box' style='width:50%;"+
    "border:2px outset #ccc;background-color:#eee;'&gt;"+
    "&lt;div style='background-color:#5d5d92;color:#fff;font-weight:bold;"+
     "padding-left:5px;'&gt;%TITLE%&lt;/div&gt;"+
    "&lt;div style='padding:15px;'&gt;%TEXT%&lt;/div&gt;"+
    "&lt;center&gt;&lt;input type='button' value='    OK    ' "+
    "onclick='document.getElementById(\"message_box\").style.display=\"none\"'"+
    " /&gt;&lt;/center&gt;"+
    "&lt;/div&gt;&lt;/center&gt;";

  var to_write = template.replace("%TITLE%", title);
  to_write = to_write.replace("%TEXT%", txt);

  if(document.getElementById("print_area"))
  { //If the 'print_area' exists, just write our data into it.
    document.getElementById("print_area").innerHTML = to_write;
  }
  else
  { //Else create the element before writing the data.
    var div = document.createElement("div");
    div.setAttribute("id","print_area");
    div.innerHTML = to_write;

    var body = document.getElementsByTagName("body")[0];
    	body.insertBefore(div,body.firstChild);
    //OR body.appendChild(div); //This will insert the message box at the end of the page.
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2011/01/javascript-alert-message-box-alternative/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preloading images with JavaScript (JQuery) and JQuery cool animations and effects</title>
		<link>http://tech.avivo.si/2011/01/preloading-images-with-javascript-jquery-and-jquery-animations-and-effect/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=preloading-images-with-javascript-jquery-and-jquery-animations-and-effect</link>
		<comments>http://tech.avivo.si/2011/01/preloading-images-with-javascript-jquery-and-jquery-animations-and-effect/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 16:29:02 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[animations]]></category>
		<category><![CDATA[client side]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery animations]]></category>
		<category><![CDATA[jquery effects]]></category>
		<category><![CDATA[preloading images with javascript]]></category>
		<category><![CDATA[preloading images with jquery]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1132</guid>
		<description><![CDATA[Model 1: &#60;img src="images/blank.gif" onload="replaceImage(this, 'your-image-url')" width="75" height="75" /&#62; Use function to replaceImage: function replaceImage(img, replacementImage) { img.onload = null; img.src = replacementImage; } blank.gif is an 1px x 1px pixel transparent image. Basically, the idea is that this blank image is loaded and expanded to 75&#215;75 (to preserve layout). That almost immediately fires the [...]]]></description>
			<content:encoded><![CDATA[<h3><strong>Model 1:</strong></h3>
<pre class="html">&lt;img src="images/blank.gif" onload="replaceImage(this, 'your-image-url')" width="75" height="75" /&gt;
</pre>
<p>Use function to replaceImage:</p>
<pre class="javascript">function replaceImage(img, replacementImage)
{
  img.onload = null;
  img.src = replacementImage;
}
</pre>
<p>blank.gif is an 1px x 1px  pixel transparent image. Basically, the idea is that this blank image is loaded and expanded to 75&#215;75 (to preserve layout). That almost immediately fires the onload handler, which changes the image&#8217;s source to the desired image.</p>
<h3><strong>Model 2:</strong></h3>
<pre class="javascript">var img = new Image();
img.onError = function(){
  //error handling here
}
img.onLoad = function(){
  //success
containerForImg.removeClass('loading-image').append($(img));
}
img.onAbort = function(){
  //user clicked stop
}
img.src = "http://example.com"   //loading begins NOW!
</pre>
<h3><strong>References:</strong></h3>
<p><a href="http://goo.by/wE3TFa" target="_blank">http://goo.by/wE3TFa</a><br />
<a href="http://goo.by/w7AjZN" target="_blank">http://goo.by/w7AjZN</a><br />
<a href="http://goo.by/w0CsbA" target="_blank">http://goo.by/w0CsbA</a></p>
<h3><strong>Background image animations:</strong></h3>
<pre class="css">$('#nav a')
.css( {backgroundPosition: "0 0"} )
.mouseover(function(){
$(this).stop().animate(
{backgroundPosition:"(0 -250px)"},
{duration:500})
})
.mouseout(function(){
$(this).stop().animate(
{backgroundPosition:"(0 0)"},
{duration:500})
})
</pre>
<h3><strong>Background transitions:</strong></h3>
<p><a href="http://goo.by/wIJ6iD" target="_blank">http://goo.by/wIJ6iD</a></p>
<h3><strong>Cool JQuery Animated robot:</strong></h3>
<p>TUTORIAL: <a href="http://goo.by/w4znKB" target="_blank">http://goo.by/w4znKB</a><br />
DEMO: <a href="http://goo.by/wmSMKs" target="_blank">http://goo.by/wmSMKs</a></p>
<h3><strong>Nice login page:</strong></h3>
<p>TUTORIAL: <a href="http://goo.by/wBrnQi" target="_blank">http://goo.by/wBrnQi</a><br />
DEMO: <a href="http://goo.by/wdgmT1" target="_blank">http://goo.by/wdgmT1</a></p>
<h3><strong>Loading content:</strong></h3>
<p>TUTORIAL: <a href="http://goo.by/wn53Y0" target="_blank">http://goo.by/wn53Y0</a><br />
DEMO: <a href="http://goo.by/wTGKDx" target="_blank">http://goo.by/wTGKDx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2011/01/preloading-images-with-javascript-jquery-and-jquery-animations-and-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recognize IE6 in HTML</title>
		<link>http://tech.avivo.si/2011/01/recognize-ie6-in-html/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=recognize-ie6-in-html</link>
		<comments>http://tech.avivo.si/2011/01/recognize-ie6-in-html/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 12:41:16 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[detect ie6]]></category>
		<category><![CDATA[detect Internet Explorer 6]]></category>
		<category><![CDATA[outdated browser warning]]></category>
		<category><![CDATA[recognize ie6 in html]]></category>
		<category><![CDATA[warning for old browser]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1124</guid>
		<description><![CDATA[You can detect IE6 using HTML relatively easy and then show warning message that this is an old browser&#8230;. &#60;!--[if lte IE 6]&#62; &#60;link rel="stylesheet" type="text/css" media="all" href="your-css-file-only-for-ie6.css" /&#62; &#60;![endif]--&#62; You can show outdated browser message like this: &#60;!--[if lte IE 6]&#62; &#60;div id="upgradeYoBrowser"&#62; &#60;a href='#' class="close" onclick='javascript:document.getElementById("upgradeYoBrowser"). style.display="none"; return false;'&#62;&#215;&#60;/a&#62; &#60;div class="wrapper group"&#62; &#60;div [...]]]></description>
			<content:encoded><![CDATA[<p>You can detect IE6 using HTML relatively easy and then show warning message that this is an old browser&#8230;.</p>
<pre class=html>
&lt;!--[if lte IE 6]&gt;
&lt;link rel="stylesheet" type="text/css" media="all" href="your-css-file-only-for-ie6.css" /&gt;
&lt;![endif]--&gt;
</pre>
<p>You can show outdated browser message like this:<br />
<img src="http://tech.avivo.si/wp-content/uploads/2011/01/outdated-browser-700x94.jpg" alt="" title="outdated-browser" width="700" height="94" class="alignnone size-large wp-image-1126" /></p>
<pre class=html>
&lt;!--[if lte IE 6]&gt;
 &lt;div id="upgradeYoBrowser"&gt;
  &lt;a href='#' class="close" onclick='javascript:document.getElementById("upgradeYoBrowser").
   style.display="none"; return false;'&gt;&times;&lt;/a&gt;
  &lt;div class="wrapper group"&gt;
   &lt;div class="alert"&gt;
    &lt;img src='/images/ie6upgrade/alert.png' alt='Warning!'/&gt;
    &lt;h1&gt;You are using an outdated browser&lt;/h1&gt;
    &lt;p&gt;For a better experience using this site, please upgrade to a modern web browser.&lt;/p&gt;
   &lt;/div&gt;
   &lt;ul id="newBrowsers" class="group"&gt;
    &lt;li&gt;
     &lt;a href='http://www.firefox.com' target='_blank'&gt;
      &lt;img src='/images/ie6upgrade/firefox.png' style='border: none;' alt='Firefox'/&gt;
      Firefox
     &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
     &lt;a href='http://www.microsoft.com/windows/internet-explorer/' target='_blank'&gt;
      &lt;img src='/images/ie6upgrade/explorer.png' style='border: none;'
       alt='Internet Explorer'/&gt;
      Internet Explorer 8
     &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
     &lt;a href='http://www.apple.com/safari/download/' target='_blank'&gt;
      &lt;img src='/images/ie6upgrade/safari.png' style='border: none;' alt='Safari'/&gt;
      Safari
     &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
     &lt;a href='http://www.google.com/chrome' target='_blank'&gt;
      &lt;img src='/images/ie6upgrade/chrome.png' style='border: none;' alt='Get Google Chrome'/&gt;
      Google Chrome
     &lt;/a&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/div&gt;
 &lt;/div&gt;
&lt;![endif]--&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2011/01/recognize-ie6-in-html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

