Total Pageviews

Tuesday, July 3, 2012

Get Blog Notes: Facebook share button on your website:

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank"><img src="/images/facebook.png" alt="Share on Facebook" /></a>

Tuesday, May 15, 2012

Active the corresponding link in navigation menu by scrolling the content.


<script type="text/javascript">
//<![CDATA[

  $(function() {


      $(window).scroll(function() {
          var threshold = $(window).height() / 4;

          var active_section;
          var active_section_top = -Infinity;

          $(".scrolling-document-section").each(function(index, section) {
              var section_top = $(section).offset().top - $(window).scrollTop();
              if (section_top > active_section_top && section_top < threshold) {
                  active_section_top = section_top;
                  active_section = section;
              }
          });

          if (active_section) {
              $("#menu-explore-features a").removeClass("active");
              $("#menu-explore-features a[href$='#" + $(active_section).attr("id") + "']").addClass("active");
          }
      });

      $(window).scroll();
  });

//]]>
</script>

Wednesday, April 11, 2012

How to grab tweets from Twitter using php

$tweets = 
json_decode(file_get_contents 
('http://twitter.com/statuses/user_timeline.json?
screen_name=USERNAME&count=10'));

var_dump
($tweets);
 
 
//json_decode(file_get_contents()) function 

How to add buttons to your website to help your visitors share content and connect with you on Twitter?

https://twitter.com/about/resources/buttons#follow


Add buttons to your website to help your visitors share content and connect with you on Twitter.