Jump to content
php.lv forumi

Recommended Posts

Posted

Sveiki!

jQuery kods
 

$(function(){
	var pages = {
			index: {url: 'home.php'},
			section1: {url: 'section1.php'},
			section2: {url: 'section2.php'},
			section3: {url: 'section3.php'}
		}
	
	$('.menu li').on('click', function(){
		var section = $(this).attr('id');		
		console.log(pages+section);
	});
});

console par parāda [object Object]session.

session ir uzspiestais id. man interesē kā es varu iegūt url parametru no pages konrētam id piem. pages.section1.url??

P.S. Paldies jau iepriekš

Guest
This topic is now closed to further replies.
×
×
  • Create New...