I had the same problem this person: ShareThis plugin not working in FancyBox title But now I have gotten it work, except the
afterShow: function(){
stButtons.locateElements();
}
Where in this code should I put it? I've tried many places, but it just says error. It say's I am placing it wrong. Where should I place it in the script below?
<script type="text/javascript">
$(document).ready(function(){
$(".fancybox").fancybox({
beforeShow: function() {
var caption = $(this.element).data("caption") ? $(this.element).data("caption") : "";
this.title = this.title ? this.title + buildShareThis(this.href) + caption : buildShareThis(this.href) + caption;
if (this.title) { ''
// New line
this.title += '<br />';
}
},
nextEffect : 'fade',
prevEffect : 'fade',
padding : 0,
margin : [15, 15, 50, 15],
afterLoad : addLinks,
beforeClose : removeLinks
});
function buildShareThis(url){
var customShareThis = "<div class='share'>"; // class for styling maybe
customShareThis += "<span class='st_facebook_hcount' displayText='Facebook' st_url='"+url+"'></span> ";
customShareThis += "<span class='st_twitter_hcount' displayText='Tweet' st_url='"+url+"'></span>";
customShareThis += "<span class='st_pinterest_hcount' displayText='Pinterest' st_url='"+url+"' st_img='"+url+"' ></span>";
customShareThis += "<span class='st_tumblr_hcount' displayText='Tumblr' st_url='"+url+"'></span>";
customShareThis += "</div>";
return customShareThis;
}
function addLinks() {
var list = $("#links");
if (!list.length) {
list = $('<ul id="links">');
for (var i = 0; i < this.group.length; i++) {
$('<li data-index="' + i + '"><label></label></li>').click(function() { $.fancybox.jumpto( $(this).data('index'));}).appendTo( list );
}
list.appendTo( 'body' );
}
list.find('li').removeClass('active').eq( this.index ).addClass('active');
}
function removeLinks() {
$("#links").remove();
}
});
</script>
I'm trying to group with kendo grid, but I am facing a problem with the default functionality of kendo grouping. Kendo grid groups the columns but it doesn't differ records of "USA" with "usa", these ...
I'm trying to group with kendo grid, but I am facing a problem with the default functionality of kendo grouping. Kendo grid groups the columns but it doesn't differ records of "USA" with "usa", these ...
I have always seen code like this: (function(){ //code here })(); How does this code work? Which function receives which parameters? (function(factory){ //code here }(function($){ //other ...
I have always seen code like this: (function(){ //code here })(); How does this code work? Which function receives which parameters? (function(factory){ //code here }(function($){ //other ...
I guess the better question here is more general: how do I debug errors for deployed apps? Does Meteor have commands/logs I can look at? I'm really not sure where to begin because everything works ...
I guess the better question here is more general: how do I debug errors for deployed apps? Does Meteor have commands/logs I can look at? I'm really not sure where to begin because everything works ...
i am working on codeigniter. I want to display data from backend to the view files. here is my code $result = $obj->get_details(); if ($result[0]) { for ($i=0; $i<count($result)...
i am working on codeigniter. I want to display data from backend to the view files. here is my code $result = $obj->get_details(); if ($result[0]) { for ($i=0; $i<count($result)...