2014-02-26 6 views
1

var url = window.location.href; 나는 내 URL을 얻습니다. 이제 URL 변수를 페이스 북 공유 링크에 넣습니다.jquery facebook share button 동적 URL 삽입

<fb:share-button href="url variable here" type="button"></fb:share-button> 

어떻게 구현할 수 있습니까?

누군가 나를 도울 수 있기를 바랍니다.

답변

0

여기 있습니다.

var url = window.location.href; 
$('fb\\:share-button').attr('href', url) 

희망이

+0

놀라운 데 도움이됩니다. Thx 너 :) – Dave

+0

@Dave 당신은 오신 것을 환영합니다 :) – heymega