adsense

Friday, August 19, 2016

Asp.net Share page content in Facebook

Modern web pages includes sharing content in various social media networks so that your friends can see your pages of interest.

This can be achieved in using

1. Third party websites.
There are plenty of websites that provide sharing functionality by just copying some code to your site.
 http://addthis.com/
 http://www.sharethis.com/
2. using Javascript
This involves creating an application in Facebook integrating some JavaScript to initialize the sharing dialog. Following article gives you a detailed description of the implementation.

Cheers,
Samitha



Wednesday, August 10, 2016

keep page footer at the bottom


Page footer can be kept at the bottom of the page using CSS or jQuery. I prefer the jQuery solution over CSS as it is much simpler and cleaner.

Following code snippet will ensure that page footer is always kept at bottom of the page. This will also work even if the page has dynamic content added when the page is being rendered. Make sure the footer id is specified as footer.


<script>

  $(document).ready(function() {

   var docHeight = $(window).height();
   var footerHeight = $('#footer').height();
   var footerTop = $('#footer').position().top + footerHeight;

   if (footerTop < docHeight) {
    $('#footer').css('margin-top', 10+ (docHeight - footerTop) + 'px');
   }
  });
</script>

cheers
Samitha

Tuesday, August 2, 2016

Jquery UI dialog remove blue halo around the close dialog button

Jquery UI Dialog tend to display a blue halo around the close dialog button as shown below.


This can be resolved by using the follwing css code snippet.

.ui-button:focus { 
     outline:none !important ;
}

Cheers,
Samitha