Return to Snippet

Revision: 45208
at April 27, 2011 11:59 by jafar


Updated Code
//HTML LINK
<a href="/about" rel="address:/about" title="About" >About</a>


//START CHANGE FUNCTION
$.address.change(function(event) {

  //THE LINK
  var theLink = event.value;

  //AJAX
  $.ajax({
    url: $.address.baseURL() + theLink +'.html',
    context: document.body,
    success: function() {
	$('#container').css({opacity:0}).fadeTo('normal',1);
    },
		
    complete: function() {	
        $('#container').load($.address.baseURL()+ theLink +'.html');	
    }
	
  //END AJAX
  });

//END CHANGE FUNCTION
});



//CHANGE SITE TITLE
$('a').click(function(){
   $.address.title($(this).attr('title'));			
});

Revision: 45207
at April 27, 2011 11:50 by jafar


Updated Code
//START CHANGE FUNCTION
$.address.change(function(event) {

  //THE LINK
  var theLink = event.value;

  //AJAX
  $.ajax({
    url: $.address.baseURL() + theLink +'.html',
    context: document.body,
    success: function() {
	$('#container').css({opacity:0}).fadeTo('normal',1);
    },
		
    complete: function() {	
        $('#container').load($.address.baseURL()+ theLink +'.html');	
    }
	
  //END AJAX
  });

//END CHANGE FUNCTION
});



//CHANGE SITE TITLE
$('a').click(function(){
   $.address.title($(this).attr('title'));			
});



//HTML LINK
<a href="/about" rel="address:/about" title="About" >About</a>

Revision: 45206
at April 27, 2011 11:48 by jafar


Updated Code
$.address.change(function(event) {

  //THE LINK
  var theLink = event.value;

  //AJAX
  $.ajax({
    url: $.address.baseURL() + theLink +'.html',
    context: document.body,
    success: function() {
	$('#container').css({opacity:0}).fadeTo('normal',1);
    },
		
    complete: function() {	
        $('#container').load($.address.baseURL()+ theLink +'.html');	
    }
	

});


$('a').click(function(){
   $.address.title($(this).attr('title'));			
});


//HTML LINK
<a href="/about" rel="address:/about" title="About" >About</a>

Revision: 45205
at April 27, 2011 11:44 by jafar


Initial Code
$.address.change(function(event) {

	//SET THE LINK
	var theLink = event.value;

	//START AJAX
	$.ajax({
		url: $.address.baseURL() + theLink +'.html',
		context: document.body,
		success: function() {
		
			$('#container').css({opacity:0}).fadeTo('normal',1);

		},
		
		complete: function() {
		
			$('#container').load($.address.baseURL()+ theLink +'.html');
		
		}
	
//END AJAX
});

Initial URL
http://www.asual.com/jquery/address/

Initial Description
Use the rel attribute to specify which "html"  file to load. In this case the link is set to the "About" page and will load the about.html file with AJAX and update the site's title and address.

Initial Title
Jquery and SWF Address 1.3.2

Initial Tags
ajax, jquery

Initial Language
JavaScript