jquery - Edit already made html using javascript (facebox) -


i using facebox (you may know of it) , script looks like

$.extend($.facebox, {     settings: {       opacity      : 0,       overlay      : true,       loadingimage : 'http://example.com/images/loading.gif',       closeimage   : 'http://example.com/images/closelabel.gif',       imagetypes   : [ 'png', 'jpg', 'jpeg', 'gif' ],       faceboxhtml  : '\     <div id="facebox" style="display:none;"> \       <div class="popup"> \         <table> \           <tbody> \             <tr> \               <td class="tl"/><td class="b"/><td class="tr"/> \             </tr> \             <tr> \               <td class="b"/> \               <td class="body"> \                 <div class="content"> \                 </div> \                 <div id="footer"> \                 <p class="left" id="changable"> \                 footer \                 </p> \                 <p class="right"> \                   <a href="#" class="close"> \                     <img src="http://example.com/images/closelabel.gif" title="close" class="close_image" /> \                   </a> \                 </p> \                 </div> \               </td> \               <td class="b"/> \             </tr> \             <tr> \               <td class="bl"/><td class="b"/><td class="br"/> \             </tr> \           </tbody> \         </table> \       </div> \     </div>'     }, 

and in file, using text (remote html) want change footer depending on file. multiple remote.html files open (share.php, warning.php) , want change footer depending on those. there can in javascript, or there can within each of share.php , warning.php grab , set it's content new?

i tried:

$(function() {         $("#changable").html('hello');      });   $(function() {         $("#changable").innerhtml = 'hello';      });  $(function() {         $("#changable").text('hello');      });  $(function() {         $(".left").html('hello');      });  

(i have jquery installed) nothing.

i'm new javascript, , know easy, can't working life of me.

thanks in advance.

jquery solution try this...

 $(function() { //a tag id anchor_id //p tag id para_id         $("#para_id").html($('#anchor_id').attr('title'));  });   

use code

$("#para_id").html($('#anchor_id').attr('title'));
trigerring event. sample code here...

 $("#button_id").click(function(){ $("#para_id").html($('#anchor_id').attr('title')); }); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -