piątek, 19 czerwca 2009

Instalacja FF 3.5

Link: http://www.ubucentrum.net/2009/06/instalacja-przegladarki-firefox-35-rc-1.html Całość operacji jakie musimy wykonać sprowadza się do wydania kilku kolejnych poleceń w terminalu: 1) Dodajemy repozytoria wklejając w konsoli każdą linijkę osobno (Ctrl+Shift+V):
echo 'deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu jaunty main' >> /etc/apt/sources.list echo 'deb-src http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu jaunty main' >> /etc/apt/sources.list
2) Następnie dodajemy klucz poleceniem:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 247510BE
3) Odświeżamy listę repozytoriów i instalujemy Firefoksa 3.5:
sudo apt-get update && sudo apt-get install firefox-3.5

czwartek, 18 czerwca 2009

Selectors, Animation, and AJAX – jQuery Tutorial

Image Effect on Hover We have an image, and we would like the image to have a nice effect when hovered. We want the image to have 80% opacity by default, and when the user mouses over the image we want to change the opacity to 100% over a certain amount of time. This can be used to for a nice effect on image galleries or ad banners. he code below accomplishes our task.
$('.hover_image img').css('opacity', 0.8).hover(function(){ $(this).stop().animate({opacity: 1}, 500); }, function(){ $(this).stop().animate({opacity: 0.8}, 500); });
Above, we change the default opacity to 80%. We then set an event for when the user mouses over and out of the image, changing the CSS accordingly. Be sure to check out the animate demo we have setup to see all of the examples in action! Simple AJAX For the last part of our article, lets see how simple AJAX calls can be with jQuery. For our example, we will have an external HTML file with some content that we want to display. We only want to load this file and display it’s content when the user clicks on a certain link, thereby decreasing our initial page load. It is as simple as using the .load method, which automatically uses a GET AJAX request by default. Lets look at how we would do this.
$('p.load_it a').click(function(){ $('#demo_content').load('external_file.html'); return false; });