/    Sign up×
Community /Pin to ProfileBookmark

Help with getting share-video info to appear

This code works on another page, but I’m trying to use it (move it) on a new page. I believe I have copied all that is needed, but it does not display the share-video form. I don’t know a lot about javascript so, I thought I’d start here.

“`
$(function () {
$(‘#share-video’).on(‘click’, function(event) {
event.preventDefault();
$(‘.share-video’).toggleClass(‘hidden’);
});
“`

“`
<div>
<button class=”btn-share” id=”share-video”><svg xmlns=”http://www.w3.org/2000/svg” width=”24″ height=”24″ viewBox=”0 0 24 24″><path fill=”currentColor” d=”M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8A3,3 0 0,0 21,5A3,3 0 0,0 18,2A3,3 0 0,0 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,9 6,9A3,3 0 0,0 3,12A3,3 0 0,0 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,20.61 20.92,19A2.92,2.92 0 0,0 18,16.08Z” /></svg> {{LANG share}}</button>
</div>
<div class=”share-video hidden”>
<div class=”row share-input”>
<div class=”col-md-4″>
<input type=”text” value=”{{CONFIG site_url}}/v/<?php echo $pt->get_video->short_id; ?>” class=”form-control input-md” readonly onClick=”this.select();”>
</div>
</div>
<a href=”#” class=”fa fa-facebook” onclick=”OpenShareWindow(‘https://www.facebook.com/sharer/sharer.php?u={{ENCODED_URL}}’)”></a>
<a href=”#” class=”fa fa-twitter” onclick=”OpenShareWindow(‘https://twitter.com/intent/tweet?url={{ENCODED_URL}}’)”></a>
<a href=”#” class=”fa fa-google” onclick=”OpenShareWindow(‘https://plus.google.com/share?url={{ENCODED_URL}}’)”></a>
<a href=”#” class=”fa fa-linkedin” onclick=”OpenShareWindow(‘https://www.linkedin.com/shareArticle?mini=true&url={{ENCODED_URL}}&title={{TITLE}}’)”></a>
<a href=”#” class=”fa fa-pinterest” onclick=”OpenShareWindow(‘https://pinterest.com/pin/create/button/?url={{ENCODED_URL}}&media={{THUMBNAIL}}’)”></a>
<a href=”#” class=”fa fa-tumblr” onclick=”OpenShareWindow(‘http://www.tumblr.com/share/link?url={{ENCODED_URL}}’)”></a>
<a href=”#” class=”fa fa-reddit” onclick=”OpenShareWindow(‘http://www.reddit.com/submit?url={{ENCODED_URL}}’)”></a>
<a href=”#” onclick=”copyToClipboard(this)” class=”fa fa-link” link=”{{CONFIG site_url}}/v/<?php echo $pt->get_video->short_id; ?>”></a>
</div>
“`

Can you make a suggestion as to what I might be missing to get the share links to appear/display?

any help is appreciated

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @chrisjchrisj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...