Latest news
Home » jQuery (page 2)

jQuery

fancybox custom css class

<script type=”text/javascript”> jQuery(document).ready(function(){ jQuery.fancybox.open({ href: ‘<?php echo $this->baseurl(); ?>/user/index/verifypopup’, type: ‘ajax’, wrapCSS : ‘fancybox-emailverify’, closeBtn : false, helpers : { overlay : {closeClick: false, css: {‘z-index’: ‘8010 !important;’} } }, keys : { close : null } }); }); </script>

Read More »

Signup or login through facebook

<div><a href=’javascript:void(null);’ onclick=”login();”>Signup/ login through facebook</a></div> <div id=”fb-root”></div> <script src=”http://connect.facebook.net/en_US/all.js”></script> 1. Include the above facebook all.js first. <script> 2. Initialize the facebook app settings. jQuery(function() { FB.init({ appId  : ” <12356666>”, status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml  : true  // parse XFBML }); });. //function ...

Read More »

jQuery email validate function

jQuery email validate  function   function validEmail(emailText){   var pattern  = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/;       if (pattern.test(emailText)) {           return true;       } else {           return false;       } }

Read More »

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 »