- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Javascript / Cookie database With & Height problem
Hi,
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.
Thanks!
P.S. Here is the link to my project: [memo.js (only for Chrome)](http://www.boeddo.nl/memo.js/ “memo.js”).
Didn’t you just post this discussion? https://css-tricks.com/forums/discussion/21377/javascript-cookie
Yes, that’s right.
But that was at the wrong forum (CSS)
It looks like you’re storing the top and left well enough. Perhaps you can store an object for each one:
`{left:100,top:200,width:97,height:200}`
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(){
console.log(this.width());
console.log(this.height());
});
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.