Created
November 18, 2012 19:01
-
-
Save djabif/4106873 to your computer and use it in GitHub Desktop.
share review
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("ul.products-list").delegate(".continue-to-sharing", "click", function (event) { | |
event.preventDefault(); | |
//TODO:Validar si esta logueado | |
var share_text = $(this).attr("data-shareText"), | |
share_title = $(this).attr("data-shareTitle"), | |
share_image = $(this).attr("data-shareImage"), | |
id = $(this).attr("data-reviewId"); | |
$("#social-share-modal ul.log-in-options li a").each(function () { | |
var original_href = $(this).attr('href'), | |
new_href = original_href.replace('AAAAA', share_text); | |
$("#share-fb-title").attr('content', share_title); | |
$("#share-fb-description").attr('content', share_text); | |
$(this).attr('href', new_href); | |
}); | |
// pass attributes to modal | |
// $('#social-share-modal').data('share', { reviewId: id, text: share_text, title: share_title, image: share_image }); | |
// $("#social-share-modal #modal-review-title").html(share_title); | |
// $("#social-share-modal #modal-review-content").html(share_text); | |
// $("#social-share-modal #modal-review-image").attr('src', share_image); | |
$('#social-share-modal').modal('show'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment