Instagram JQuery plugin with shadowbox

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Instagram JQuery plugin with shadowbox

Mike
I'm trying to get a Instagram feed on website that opens with shadowbox. I'm still learning alot aobut scripting...

#(function ($){
  $.fn.instagram = function (options) {
    var that = this,
        apiEndpoint = "https://api.instagram.com/v1",
        settings = {
            hash: null
          , userId: "15014747"
          , locationId: null
          , search: null
          , accessToken: '15014747.727d5a0.0aa951fe9a124d19bc251ed03db12da8'
          , clientId: '727d5a04abd64a7da0aca9fce8ec91f3'
          , show: null
          , onLoad: null
          , onComplete: null
          , maxId: null
          , minId: null
          , next_url: null
          , image_size: 'low_resolution'
          , photoLink: true
        };
       
    options && $.extend(settings, options);


    function createPhotoElement(photo) {
       
         
      var image_url = photo.images.thumbnail.url;
     
      if (settings.image_size == 'low_resolution') {
        image_url = photo.images.low_resolution.url;
      }
      else if (settings.image_size == 'thumbnail') {
        image_url = photo.images.thumbnail.url;
      }
      else if (settings.image_size == 'standard_resolution') {
        image_url = photo.images.standard_resolution.url;
      }

               
      var innerHtml = $('')
        .addClass('instagram-image')
                .attr('src', photo.images.low_resolution.url)
                .append( $('') )
               
      if (settings.photoLink) {
        innerHtml = $('')
          .attr('target', '_self')
                  .attr('href',photo.images.standard_resolution.url)
                  .attr('rel',"javascript:shadowbox")
         
                  .append( $('') )
          .append(innerHtml);
      }

      return $('<div>')
        .addClass('instagram-placeholder')
        .attr('id', photo.id)
        .append(innerHtml);
    }
       

   
    function createEmptyElement() {
      return $('<div>')
        .addClass('instagram-placeholder')
        .attr('id', 'empty')
        .append($('<p>').html('No photos for this query'));
    }#

is the jquery.isntagram script

I have tried everythign I can think of.. if I type

#.attr ("rel", 'shadowbox")#

It will pull up shadowbox ccs in text but wont launch shadowbox..

Any advice?

Thanks