I am trying to modify this tutorial to add in social network links. Here is the markup for the tile:
<li>
<a href="http://cargocollective.com/jaimemartinez/"
data-largesrc="http://wwwdev.cco.purdue.edu/ImageSlider/21centuryimages/logos/ALDI.png" data-title="ALDI"
data-facebook="http://www.facebook.com"
data-description="" >
<img src="images/aldi.png" alt="img01"/>
</a>
</li>
And as you can see, I've included a data attribute of data-facebook. I went into the JS file and added the facebook lines to the following:
var $itemEl = this.$item.children( 'a' ),
eldata = {
href : $itemEl.attr( 'href' ),
largesrc : $itemEl.data( 'largesrc' ),
title : $itemEl.data( 'title' ),
description : $itemEl.data( 'description' ),
facebook : $itemEl.data( 'facebook' )
};
this.$title.html( eldata.title );
this.$description.html( eldata.description );
this.$facebook.html( eldata.facebook );
this.$href.attr( 'href', eldata.href );
When I save it and try it in Chrome, when I click the tile that shows the expanded information container, it takes me to the the href attribute instead. I'm not sure why adding those two lines messes it up. More specifically I've traced the line that actually makes the tile behave differently to this.$facebook.html( eldata.facebook );. Could you guys take a look at what I've done and see if I've made a glaring error? I've never done something like this so I'm new to it. Here is the site where you can check it out: http://wwwdev.cco.purdue.edu/matt/grid/index.html
Thanks!
this.$facebookis defined?