Home » javaScript (page 2)


Fancybox intilialization and content loading from a URL

<script type=”text/javascript”> jQuery(‘document’).ready(function() { jQuery(‘#delete’).click(function(e) { e.preventDefault(); var selected_ids = new Array(); jQuery(“input:checkbox:checked”).each(function(){ selected_ids.push(jQuery(this).val()); }); if (selected_ids.length > 0){ var oDeleteUrl    = ‘<?php echo $this->baseUrl();?>/messages/delete/message_ids/’+selected_ids+’/place/inbox’;              jQuery(“#delete”).fancybox({                 ‘type’: ‘ajax’,                 ‘href’ : oDeleteUrl             }); } }); }); </script>

Read More »

Bootstrap Tooltip intialization

Some times ajax loading is required for refresh content of a page. That time bootstarp tooltip is not work smoothly. That time we need to re-initialize the bootstrap tootip js using following code. After that tooltip will work like normal. <ul><li> <a href=”javascript:void(0);” rel=”smarttooltip” data-original-title=” Total hits of posts over last month “><?php echo $this->influences; ?></a> <span>Hits</span> </li></ul> <script type=”text/javascript”> ...

Read More »