Skip to content

location of <script> $('.gifplayer').gifplayer(); </script> #40

@nasser1

Description

@nasser1

Thanks you first for gifplayer. I just downloaded and trying the latest.

I have been trying it and I have small issue. The player seems to require putting

<script>
	$('.gifplayer').gifplayer();
</script>

In the body of the HTML and not in the HEAD, and it has to be at the very end of the HTML page below all earlier entries of
<img class="gifplayer" src="media/banana.png" />

If I add it below each img entry, then it does not work well. it seems there has to be once instance of it,

This causes a problem, since the software I am using to generate the HTML splits the large document into multiple separate HTML pages and therefore the code $('.gifplayer').gifplayer(); will not be located on the same page where the gif call is and where it is needed.

I tried adding

<script>
	$('.gifplayer').gifplayer();
</script>

to the HEAD of the HTML page, but that did not work. It had no effect. It seems that is has to be below the code that uses it for some reason in the BODY.

Is it possible to make the player work by putting the script code $('.gifplayer').gifplayer(); in the HEAD of the HTML page instead of the BODY?

This will then work for me, because when splitting the large document, the HEAD of the page is the same for each separate page, and so I will not lose the $('.gifplayer').gifplayer(); as it happens now.

Thank you
--Nasser

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions