integ/js/iri.js
changeset 2 05fdc9616ba0
parent 1 4aec3f00ea87
child 3 046d617a7d6e
--- a/integ/js/iri.js	Wed Apr 03 16:19:25 2013 +0200
+++ b/integ/js/iri.js	Wed Apr 03 16:52:19 2013 +0200
@@ -1,7 +1,5 @@
 $(function(){
 
-
-
 $(window).bind('resize', function(){
 	setSidebarContentHeight();
 });
@@ -20,13 +18,26 @@
 $('a.more').bind('click', function(e){
 	e.preventDefault();
 	var target = $(this).attr('href');
-	if($(this).hasClass('less')){
-		$(target).hide();
-		$(this).removeClass('less')
+	if($(target).hasClass('less')){
+		$(target).removeClass('less');
+		$(this).addClass('less');
 	}else{
-		$(target).show();
-		$(this).addClass('less')
+		$(target).addClass('less');
+		$(this).removeClass('less');
 	}	
 });// a.more
 
+
+
+//-- API allocine
+var urlMovie = 'http://api.allocine.fr/rest/v3/movie?partner=B00015838755&code='+ idMovie;
+$.getJSON(urlMovie, function(data) {
+	var movie = data.movie;
+	var castMember = movie.castMember;
+	console.log(castMember)
+})
+
+
+
+
 });
\ No newline at end of file