similar to: cumulativeOffset problem with dynamically loaded elements

Displaying 20 results from an estimated 10000 matches similar to: "cumulativeOffset problem with dynamically loaded elements"

2008 Apr 22
2
Prototype's cumulativeOffset() is not a function
Hi all, I''m sure I''m missing something obvious. I add prototype.js and my custom js file in the head: <script src="prototype.js" type="text/javascript"></script> <script src="my_js_file.js" type="text/javascript"></script> my_js_file.js looks like this: Event.observe(window, ''load'', loadTasks,
2006 Aug 09
0
Position.cumulativeOffset issues?
I have been working on a project that involves a lot of front-end functionality and I noticed that Position.cumulativeOffset was not as accurate as I had expected/needed. I also needed some more options and I just didn''t really like having to type Position.cumulativeOffset all the time. I wanted to simply do element.getOffset() and be done. After lots of time spent going back and forth
2006 Feb 08
2
Prototype: Position.clone()
Does the duplicate clone method of Position serve a subtle purpose that I don''t understand? I feel kind of foolish even asking, but ... I just don''t get it. I''ve been looking at this for a couple days now and as far as I can tell, the first definition is useless as it gets overlaid by the second one. I don''t see any closure trickery going on here, either.
2006 Jan 28
4
Unspecified error in prototype.js
Hi, 1. I have 2 panes, each having approximately 45-50 slides, all the slide images are 110x82 pixels in size, enclosed in their respective div''s. 2. These divs are further enclosed in a parent div, which is defined as a Sortable on page load. 3. There is a destination div on the RHS also. Sortable.create("div_leftDiv", {ghosting:true, revert: true, dropOnEmpty:true,
2005 Aug 17
2
CumulativeOffset
Hey All, I have a fairly basic question about the prototype.js library. First, I''ve been looking for documentation on this and I have yet to find it. If any of you know of any, please let me know. Since I''m new to both the scriptaculous and prototype libraries could someone explain why I would want to use the cumulativeOffset method and not to just grab the offset off
2006 Nov 28
11
Extending Element with getTop, getWidth, getLeft problem
Hi, I need to extend the Element object with getTop, getWidth, getLeft . I wrote something like this in an js file and loaded it after the prototype.js . ---------------------------------------------------- Object.extend(Element, { getWidth: function(element) { element = $(element); return element.offsetWidth; }, getTop: function(element) { element = $(element); var curtop
2007 Jul 31
6
Using Effect.Move() while maintaining the elements DOM order
Hi there, is it possible to maintain the elements order in DOM when using Effect.Move()? Currently the Move effect will change the element position (using top and left style attrs), this works quite well too, but what I''d like is to change the elements position as well. Consider the following example: html: ... <div id="a">First</div> <div
2006 Jan 30
0
Draggable with auto-scroll
Thomas, I''m mostly writing this to you. A couple weeks ago I grabbed the latest SVN version of dragdrop.js because I needed the auto-scroll functionality. I just fixed something in that script that wasn''t working correctly and thought you might want to hear about it. You may have already caught it since I grabbed the script but here it is anyway. In the updateDrag() function
2005 Aug 24
1
draganddrop mousemove event question
I''ve noticed that the update method of every Draggable is called for each mousemove event while nothing is dragging. I''m wondering what the reasoning behind this is (vs. attaching the mousemove handler after a mousedown event). Does it have a noticeable performance impact when there are lots of draggables (say 400)? Disclaimer: I''m really new to JavaScript and may have
2006 Mar 17
1
Autocompleter.Local problem/desparate plea for help...
I have been trying to write a selector function for Autocompleter.Local that will show a predefined Array and will scroll automatically to the first match. I have had success with with getting my list to populate and show all of the choices, however I cannot get it to scroll to the first match. Since I build the JS Array I can know exactly how many items are in the list going into my selector,
2008 Jul 01
4
Positioning Oddities
I''m having some trouble using Element#cumulativeOffset and Element#cumulativeScrollOffset to absolutely position an element right under a link in certain browsers. I made a couple of tests to illustrate the issue, which can be found here: http://www.jeffreykeen.com/sandbox/position. But in summary, I''ve found two cases which seem to be problematic. 1. If the link has a
2005 Jun 23
0
dragdrop library
Thomas, Special thanks for the dragdrop library. I consider your javascript abilities quite superior to my own, in fact I''m just setting out on a quest to master javascript, I found your library the other night and started hacking away on my app. I replaced a dom-drag.js library I was using before with yours since it integrated with prototype better, and appears to be better coded.
2006 May 16
4
Positioning
I''m trying to understand the Position object. Specially the various offset methods. From looking at the code I think I may understand them but I wanted to run it by the group to make sure I had a clear understanding. realOffset - This returns the coordinates of the element as if none of the elements on the page are scrollable from the document edge. cumulativeOffset - This returns
2007 Apr 06
5
Getting a dynamically generated elements dimensions
Ive posted this before, but unfortunately I still have yet to resolve it after numerous attempts... Here is the overview: populate a container element with some new html using Element.update and then retrieve the new dimensions of the containig element. Here is a bit of code snippet that I would think should work.. but doesn''t: ==== start snippet ==== <style> .bigBox {
2005 Dec 15
1
Some handy methods - perhaps cool enough to be committed some time
Hi. Some time ago I posted some prototype-"extensions", which could come in handy. I''ve been updating them a bit and added a few more and I think its time to share it again. Feel free to use it. The code should be rather self explaining, but heres a quickguide. - new Geometry.Size(width,height) - Creates a new instance of size - new Geometry.Position(x,y) - Creates a new
2006 Feb 18
0
Move element into view
Hello, I am in fly-by mode as I am still more than busy, so I just dumb this one out for anyone interested. Adapt it for your needs if you like it. This effect is similar to ScrollTo, but scrolls the viewport vertically the minimal amount necessary to bring the element into view. Usage: new Effect.ScrollToFullView(element, {duration: 0.6, offset: 10}); Offset is the distance in pixel to the
2006 Jan 31
1
RE: Re: form elements in sortable lists
I never got it to work back on one of the early release candidates of scriptaculous 1.5. However, I thought I read in one of the release notes that it was fixed. Are you using the latest version? I ended up just disabling the sortable while they were in ''editing'' mode, and then recreating it after they were done editing. Greg > -----Original Message----- > From:
2006 Nov 24
1
sortable - after complete dropping element want to send ajax reqeust with id of elements: draggable and droppable
Hi all. I have specific situations - I use sortable on html list, and after I move elements I want to do ajax reqeust to serwer with the id of dragging element and id of the element that was droppable. How to do it? which function in Sortable class i have to overrider or modify? i try to modife onhover method in sortable and put a ajaxRequest call before methods dropon.parentNode.insertBefore
2007 Oct 22
2
Form selector is not cross-browser consistent with label elements
I have found that Prototype does not select the same value based on the $F form selector. Consider this HTML snippet: <label for="search">Your query<input name="q" value="" type="text" id="search"></label> Using $F(''search'') returns: - ''''Your query" in Firefox 2 - "Your query"
2007 Jun 24
1
Tiling elements
Hi, Is there anything available to enable tiling elements with prototype? I have an application that allows a number of divs to be opened and overlapping at the same time, and would like the have a Tile Panels button that would arrange the divs on screen without any overlaps. At first I thought it would be a simple function, but can see if I want the tiling to be smart it could take a bit of