GithubHelp home page GithubHelp logo

nclud / verbatim Goto Github PK

View Code? Open in Web Editor NEW
54.0 54.0 9.0 382 KB

A jQuery plugin that enables deep linking to your content. Currently in beta.

Home Page: http://verbat.im

CSS 12.61% JavaScript 87.39%

verbatim's People

Contributors

jshawl avatar tbodnya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

verbatim's Issues

Button container position

The position of the buton container does not behave consistently because it gets appended to the target selected element, which might have position: relative (or a combination of absolute and relative with parent elements), limiting and messing with the button position.

Appending the button container to document.body does not cause these problems because the body represents the whole document therefore absolute values represent the correct position. Then we can safely use event.pageX and event.pageY to position the container absolutely in the dom.

        function appendButton(){
            var target;
            var $doc = $(document.body);
            $($doc).append(buttonContainer);
            $('span[style*="'+settings.highlightColor+'"]').addClass(settings.selectedClass);

            if ((upY - downY) > 15)
                target = 0
            else
                target = ($(anchorNode).outerWidth() / 2) - $('.' + settings.buttonClass).width() / 2;

            $('.' + settings.buttonClass).css({
                "left": event.pageX - 50,
                "top": event.pageY - 50
            })
        } 

unwrapping, why?

this line
$('.' + settings.selectedClass).contents().unwrap();
does remove the parent of the selected text, upon deselection the parent is not reinstated causing html/css issues . I have just disabled it, the plugin seems to work just fine, what's the purpose of it?

Popup styling

It seems that if there is a margin on the body, the popup doesn't extend all the way. Also there might be some issues on the default textbox.

screenshotj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.