Hi Everyone:
I am using the jQuery plugin: cluetip. I have two php files. The parent files has multiple tables but one content loads data from the child document form. For existing content that is retrieved from the database, the cluetip works fine.My code is below:
- for(i=0;i<count;i++){
$('#tr_orders'+i).cluetip({sticky: false, width:360,closePosition: 'title', closeText: "<img src='../images/cross.png' alt='close' width='16' height='16' />",arrows: true});
$('#tr_orders'+i).cluetip({attribute: 'name', width: 400, showTitle:true, cluezIndex: 500, clickThrough: true }); } - $().ready(function() {
setup_cluetip();
});
However when the child document is called and the user fills in the form and that data is used to create a new row on the parent table. For the new row, the cluetip does not show even though the text fields are the same as existing rows. Afterwards, I created a click event in the parent doc and called it in the child doc as shown below. I wanted to test reloading the cluetip code above which is in a function on the parent and it worked for the new row but then the existing rows' cluetip stopped working. Each row has a unique id and all rows are in the div below.
- $(parent.document).find('#dialog iframe').contents().find('#div_orders_area').trigger('click');
In essence when the existing rows cluetip work then the new one doesn't work and vice versa when I get the new row to work then the existing cluetip stop working. How do I get the parent document to display the cluetip for existing and new rows added dynamically from the child form? Thank you very much.