Navigation

    Monaca & Onsen UI
    • Register
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. ajisan
    A
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    ajisan

    @ajisan

    0
    Reputation
    1
    Posts
    323
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    ajisan Follow

    Posts made by ajisan

    • Get item click from list with json array

      How can i get detail from click 1 item at this list ?

      function nowPlaying() {
      var nowPlayUrl = https://api.themoviedb.org/3/movie/now_playing?api_key=API_KEY&language=en-US;
      $.ajax({
      url: nowPlayUrl,
      method: ‘GET’,
      dataType: ‘JSONP’,
      success: function (res) {
      var print = “”;
      var movie = res.results;
      for (var i = 0; i < movie.length; i++) {
      print += <ul class="list" style="padding: 10px; margin-top: 20px;"> <li class="list-item"> <div class="list-item__left"> <img src="https://image.tmdb.org/t/p/w500/${movie[i].poster_path}" style="width: 100%; height: 150px" alt="${movie[i].title}"> </div> <div class="list-item__center"> <div class="list-item__subtitle"><b>${movie[i].title}</b></div> <div class="list-item__subtitle">${movie[i].overview.substring(0, 40)} ...</div> <div class="list-item__subtitle"><b>Release Date :</b> ${movie[i].release_date}</div> <div class="list-item__subtitle"><b>Vote Count :</b> ${movie[i].vote_count}</div> </div> </li> </ul>;
      }
      document.getElementById(‘isiNowPlaying’).innerHTML = print;
      },
      error: function (err) {
      console.log(err);
      }
      });
      }

      posted in Onsen UI
      A
      ajisan