Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- var nextUrlArticle = null;
- $(document).ready(function() {
- $.get("{{ path('next_video_url', { 'id' : article.id })}}", function(result) {
- nextUrlArticle = result.url;
- });
- function getNextVideo(ext) {
- if (nextUrlArticle) {
- window.location.href = nextUrlArticle;
- }
- }
- });
- </script>
- $(document).ready(function() {
- $.get("{{ path('next_video_url', { 'id' : article.id })}}", function(result) {
- nextUrlArticle = result.url;
- getNextVideo(); // call function after update
- });
- function getNextVideo() {
- if (nextUrlArticle) {
- window.location.href = nextUrlArticle;
- }
- }
- });
- nextUrlArticle = {{ nexturl }} //django syntax to pass context vars to template
- function getNextVideo() {
- if (nextUrlArticle) {
- window.location.href = nextUrlArticle;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement