Phonegap 2.1 Whitelist rejection with Ajax

For those who are using phonegap 2.1 and want to do web app or want to request external data from your server or others,
you get use jquery Ajax.

$.ajax({
url: 'http://google.com',
   dataType: "text",        // <=== new bit
   success: function(data) {
      alert(data);
                     
   }
});

you are using this and get a error of telling you that you have whitelist rejection, here is the solution
open you Xcode phonegap project Navigate to Resources folder, click on Cordova.plist
at the last row, rightclick and chose to "add a new row",
enter the name "ExternalHosts" change Type to arrow,
expand this and add in the link url that you want.
for more infos please read
http://docs.phonegap.com/en/2.0.0/guide_whitelist_index.md.html#Domain%20Whitelist%20Guide

jQuery Mouse Wheel Slider

This is one of the project that i created for my full time job, which i want to share this interesting jQuery Wheel slider.
If you haven see the slider before, please check out below

[button link=”http://35.185.150.236/demo/jwslider/” size=”small” target=”self”]Demo[/button]          [button link=”https://github.com/maxlibin/jwSlider” size=”small” target=”blank”]Download[/button]

Lets start with the basic html first
I have included 4 javascript files
jquery1.8.js
jquery.mousewheel.min.j
jquery.easing.1.3.js
Script.js (you can see the code below or download the whole package)
I have also included the html5shiv that allow me to render Html5 in older browsers.
Continue reading “jQuery Mouse Wheel Slider”

Smooth scroll and find position of scrollbar with jQuery plugin

As a Html designer we all know that we can navigate to a position within a page using Anchor Point
[cc lang=”html”]
//set a position
This is a position
// button for me to go to that position
Go

however many designers are building more sexy and easy ways using javascript libraries, one of the easiest way i found that allow me to allow the scrolling smoothly is a plugin, download below
[button link=”http://www.position-absolute.com/articles/better-html-anchor-a-jquery-script-to-slide-the-scrollbar/” size=”medium” target=”blank”]anchor plugin[/button]      [button link=”http://docs.jquery.com/Downloading_jQuery” size=”medium” target=”blank”]jQuery[/button]

Its very easy to use, all you need to do is call this plugin to header

[cc lang=”html”]

Continue reading “Smooth scroll and find position of scrollbar with jQuery plugin”