Jump to content
php.lv forumi
Sign in to follow this  
ziedinjsh

lapas izvēlne

Recommended Posts

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š

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...