⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Append a button on options content



stephen619

stephen619
  • profile picture
  • Member

Posted 08 December 2016 - 07:07 AM

Hi all how can I append a button the div with the id options-content below is the code I'm trying to use, all help is welcome.

 

JS in Header

 

<?php if($page_title = 'Assign Approved Orders') { ?>

$(function () {
    $('#options-content').append('<a class="close-anchor btn" href="/distributors/distributor_logistics/create_deliveries"><i class="icon-plus"></i> Add Delivery</a>');
});

<? } ?>

 

This code is appending the button to all my other crud pages. Please note I'm using the twitter-bootstrap theme. Alternatively, is there a way to add javascript in the body tags, I feel that will solve my problem

 


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 21 December 2016 - 08:19 AM

u can use add_action functionality ... please read the documentation .. such features required are already shared in there..

 

Happy GCing:)