title: jquery ui button not appearing after ajax call
body: <p>I have a jquery ui button in a main page <code>(index.php)</code> which appears and works fine. In the main page I have a div <code>&lt;div id="cardarea"&gt;</code> which I use as a placeholder for dynamic content. The dynamic content is stored in another file <code>(cardarea.php)</code> and elements from this file is displayed dependent on the <code>$_GET['key'];</code> variable it gets from input forms in the main page.</p>
  
  <p>Now the problem is that when I try to include the same jquery ui button (<code>&lt;settingsbtn&gt;</code>) in a part of the contents in the file <code>cardarea.php</code>, this does not display.</p>
  
  <p>The javascript code and definitions are included in the header of <code>index.php</code>. I guess the button in the file <code>cardarea.php</code> cannot reach this information, or that there is an error in my javascript definitions. I've tried including the same javascript code and definitions also in the file <code>cardarea.php</code>, but with no effect.</p>
  
  <p>I'm really quite at a loss of what is the problem here. I will include the javascript definitions, but I'm not sure what other code may be relevant to decifer this problem. Please let me know what additional information may be useful to find the problem, if applicable. Thanks.</p>
  
  <p><strong>Javascript:</strong>
      </p>
  
  <pre><code>    $(function() {
  
  $( "settingsbtn" ).button({
          icons: {
                      primary: "ui-icon-triangle-1-s"
                  },
          text: false
  });
  
  }); 
  
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>INDEX.PHP</strong></p>
  
  <pre><code>&lt;?php
  
  
  include 'functions.php';
  include 'incl_ajax.php';
  
  
  ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  &lt;link href="css/amariffic.css" rel="stylesheet" type="text/css" /&gt;
  &lt;title&gt;Test&lt;/title&gt;
  
  
      &lt;link href="css/smoothness/jquery-ui-1.10.3.custom.css" rel="stylesheet"&gt;
      &lt;script src="js/jquery-1.9.1.js"&gt;&lt;/script&gt;
      &lt;script src="js/jquery-ui-1.10.3.custom.js"&gt;&lt;/script&gt;
  
      &lt;?php include 'snip_javascript.php'; // innholder både kode og css-link. ?&gt;
  
  &lt;/head&gt;
  
  
  
  &lt;body class="body"&gt;
  
  &lt;settingsbtn&gt;&lt;/settingsbtn&gt;
  
  &lt;a href="javascript:ajaxpage('_cardarea.php?key=5', '_cardarea');" class='nodecor'&gt;Show&lt;/a&gt;
  
  &lt;div id="_cardarea"&gt;&lt;/div&gt; 
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>CARDAREA.PHP</strong></p>
  
  <pre><code>&lt;?php
  
  include 'functions.php';
  $key = $_GET['key']; 
  
  
      if ($key == '5') {
          echo '&lt;div&gt;';
          echo 'Button: &lt;settingsbtn&gt; &lt;/settingsbtn&gt;';
          echo '&lt;/div&gt;';
      }
  
  ?&gt;
  </code></pre>