Get a free trial // Grow your CSS skills // Land your dream job

Javascript / Cookie database With & Height problem

  • # December 24, 2012 at 9:16 am


    I’m currently making memo.js, a jQuery plugin for Chrome-users. With the plugin, users can mark text on a website.

    I create memo.js with cookies, Javascript, CSS and HTML.

    The script remembers the place from the memo, but not the height.
    I use **resize:both;** to change the height from the memo, with the standard height and with: 10x70px.

    Could anyone help me with the height and the width, please?
    I’m a beginning Dutch JS’er.


    P.S. Here is the link to my project: [memo.js (only for Chrome)]( “memo.js”).

    # December 24, 2012 at 9:38 am

    Didn’t you just post this discussion?

    # December 24, 2012 at 11:45 am

    Yes, that’s right.
    But that was at the wrong forum (CSS)

    # December 26, 2012 at 9:39 pm

    It looks like you’re storing the top and left well enough. Perhaps you can store an object for each one:


    As you’re able to store data already, it sounds like you’re wondering how to acquire the height and width on resize:

    jQuery('window').on('resize', '.note', function(){

    Without digging too much into it, I’m sure that something along these lines will suit you.

    It would be easier to debug if we had a Codepen style example. Let me know how it goes.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed