Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated messi.js to correct when messi appears off page #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andersonk17474
Copy link

added a slightly modified version of the nudge function from Nicolas Honing's popup.js (https://github.com/nhoening/popup.js/) that will prevent messi from appearing off the page when using manual positioning

ex:

(pseudo html)
( span class="test" style="position:absolute; top:400px; left: 1000px;" >test /span )
(/html)

<script type="text/javascript"> $( document ).ready(function(){ ``` console.log("loaded"); var popup; $('.test').on('mouseover', function(e){ popup = new Messi('This is a message with Messi.', {closeButton : false, center: false, viewport : { top: ( e.pageY.toString()+"px"), left: ( e.pageX.toString()+"px")} }); }); $('.test').on('mouseout', function(e){ if (typeof popup === "object" ){ popup.hide(); } }); ``` });

added a slightly modified version of the nudge function  from Nicolas Honing's popup.js (https://github.com/nhoening/popup.js/) that will prevent messi from appearing off the page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant