title: Is it good to use $.getScript to get cross domain js file that contain json content?
body: <p>I am new to <code>JSONP</code>, below is my case:</p>
  
  <p>I use <code>PHP</code> to write a js file with <code>JSON</code> content for front-end to read, I tried the way below and it's works.</p>
  
  <p>But, I want to ask </p>
  
  <p>A) is it necessary to include a <code>jsoncallback()</code> to wrap the <code>JSON</code> content in <code>album.js</code>?</p>
  
  <p>B) is it good to use <code>$.getScript()</code> to read js file contain JSON content for cross domain?</p>
  
  <p>Thanks</p>
  
  <p><strong>1. code to load js file</strong></p>
  
  <pre><code>$.getScript("http://127.0.0.1:8080/album.js")
  
  function jsoncallback (data){
      $.each(data, function() {
          console.log($(this))
      })
  }
  </code></pre>
  
  <p><strong>2. album.js content</strong></p>
  
  <pre><code>jsoncallback([{
          "id": "23",
          "author": "roy",
          "email": "a",
          "age": "0",
          "tel": "1",
          "title": "test",
          "image_name": "Lighthouse.jpg",
          "image_type": "image\/jpeg",
          "image_size": "561276",
          "status": "1",
          "create_date": "2013-04-03 14:39:32",
          "modify_date": "2013-04-09 19:25:07"
      }, {
          "id": "22",
          "author": "roy",
          "email": "a",
          "age": "0",
          "tel": "1",
          "title": "test",
          "image_name": "Desert.jpg",
          "image_type": "image\/jpeg",
          "image_size": "845941",
          "status": "1",
          "create_date": "2013-04-03 14:39:29",
          "modify_date": "2013-04-09 19:25:02"
      }
  ])
  </code></pre>