title: Adding a jQuery tab
body: <p>Well i am new to jQuery and I was going through Bob tabor's video present in <a href="http://www.learnvisualstudio.net/free/javascript-and-jquery-training/" rel="nofollow">http://www.learnvisualstudio.net/free/javascript-and-jquery-training/</a> describing how to install and utilize jQuery plugins..</p>
  
  <p>In that he teaches about tab and adding a tab through the source code present at jqueryui.com.. But the source code for jquery doesn't work..</p>
  
  <p>JSfiddle added:</p>
  
  <p><a href="http://jsfiddle.net/shettyrahul8june/mf5dm/" rel="nofollow">http://jsfiddle.net/shettyrahul8june/mf5dm/</a></p>
  
  <p>these are the two jQuery codes i am stuck up with..
      $( "#tabs" ).tabs().tabs("add","1. Title changed.html","Click-a-Rahul");</p>
  
  <pre><code>$("&lt;li&gt;&lt;a href='10.jQuery events.html'&gt;Click-a-Rahul&lt;/a&gt;&lt;/li&gt;").appendTo( "#tabs ul");
  $("#tabs").tabs().tabs("refresh");
  </code></pre>
  
  <p>As you can see i tried with both deprecated method add as well as the newer one refresh.. Both din't work.. A new tab was added and the styling was perfect.. But there was no content inside the new tab though link was provided.. </p>
  
  <p>Any help would be appreciated..</p>
  
  <p>Also i found that when i use the add method, it works for the id such as #tabs-3 but it doesnt work for links...</p>
  
  <p>I got this error in javascript error console..</p>
  
  <p>Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. file:///E:/My%20Codes/Web%20Designing%20and%20Developing/Javascript/Javascript%20Fundamentals%20Microsoft/1.%20Title%20changed.html</p>
  
  <p>XMLHttpRequest cannot load file:///E:/My%20Codes/Web%20Designing%20and%20Developing/Javascript/Javascript%20Fundamentals%20Microsoft/1.%20Title%20changed.html. </p>
  
  <p>No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. 11.Installing%20and%20Utilising%20jQuery%20plugins.html:1</p>
  
  <p>Failed to load resource: the server responded with a status of 404 (Not Found) <a href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/dot-luv/images/ui-bg_diagonals-thick_15_0b3e6f_40x40.png" rel="nofollow">http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/dot-luv/images/ui-bg_diagonals-thick_15_0b3e6f_40x40.png</a></p>
  
  <p>Failed to load resource: the server responded with a status of 404 (Not Found) <a href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/dot-luv/images/ui-bg_dots-small_20_333333_2x2.png" rel="nofollow">http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/dot-luv/images/ui-bg_dots-small_20_333333_2x2.png</a></p>
  
  <p>Failed to load resource: the server responded with a status of 404 (Not Found) <a href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/dot-luv/images/ui-bg_flat_40_292929_40x100.png" rel="nofollow">http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/dot-luv/images/ui-bg_flat_40_292929_40x100.png</a></p>
  
  <p>Failed to load resource: the server responded with a status of 404 (Not Found) <a href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/dot-luv/images/ui-bg_dots-small_40_00498f_2x2.png" rel="nofollow">http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/dot-luv/images/ui-bg_dots-small_40_00498f_2x2.png</a></p>
  
  <p>Problem resolved.. It was due to cross domain request.. Also i was not using a local server to test my page.. I used wamp and it worked.. Working code is present in <a href="http://jsfiddle.net/shettyrahul8june/mf5dm/" rel="nofollow">http://jsfiddle.net/shettyrahul8june/mf5dm/</a></p>