Tag: dom

Dynamically moving div, like Yelp's moving map

I am trying to implement something very similar to Yelp’s moving map. See: http://www.yelp.com/search?find_desc=restaurants&ns=1&find_loc=mountain+view%2C+ca Basically it starts off somewhere in the middle of the page, but if you scroll down far enough that you wouldn’t be able to see it, it moves down as well. What is the best way to do this in javascript? […]

What happened to the event groups chapter of DOM level 3 specification?

In the 2006 version of DOM events level 3 specification there is a chapter “Event groups”, but in the current version there is none. What happened to this chapter? Was it intentionally removed? It would be very helpful to have (partially) ordered event handlers list.

How to detect “onload” for base-64 encoded webfonts?

How do I access the DOM to detect when my page’s webfonts have loaded? I have 29 .ttf fonts base64-encoded into a single CSS file. I also have a hidden div on the page that uses each of the fonts, to make the browser read each of the fonts into memory. That process takes time, […]

jQuery – after AJAX Call, old elements still exist in DOM? How to remove?

I have a button to refresh the content using AJAX, calling refreshFeed(). I still need to manipulate the content loaded by AJAX so I appended .live() to some links in the AJAX-loaded content to initiate other AJAX calls, let’s say “Comment”. “Comment” button gather some values from the hidden input fields and post them to […]

Dynamic DOM and jQuery

I open an ajax modal window with jQuery. How can I update the DOM and make the new elements available for jQuery to use?

Replacing top references in a frameset based web application

I am trying to put a pega workflow web application in an Iframe. This application was previously launched as an independent browser window & has multiple references to top object within JavaScript & uses frameset. Unfortunately i don’t have the liberty to change application code, so i am using apache as a reverse proxy & […]

What JS objects can be added through appendChild()?

I am trying to extend the DOM. I “subclassed” from the Div element: var Subclass = function() {} Subclass.prototype = document.createElement(‘div’); Subclass.constructor = Subclass; var obj = new Subclass(); var obj.innerHTML = ‘test’; document.body.appendChild(obj); // Exception: Node cannot be inserted … point in the hierarchy So if an object’s prototype being a DOM object won’t […]

onBlur event overriding jQuery UI events

I have a textbox that is wired up using jQuery UI 1.8.4 autocomplete. I have the select event wired up so when the user chooses an item from the list it calls another javascript function that issues an ajax request to save the data and update an XML document. On the same textbox there is […]


I’m getting this error after trying to “appendChild” to an element that was just created (in for loop). What does this error mean? I suppose it’s not possible to append sth. to an element that doesn’t really exist in DOM. How do I fix it? “innerHTML” works, but I don’t think it’s really clean and […]

iPad safari don't show loaded images until slide the screen

i have a problem in iPad Safari. when i use Javascript to append image to div using elm.appendChild(img) the images don’t appear until the screen is touched. the same code works perfect on IE,Firefox,Chrome,and android browsers. i have uploaded video that shows the problem. http://www.youtube.com/watch?v=nBN9fThDik8 is it related to the device ? or there some […]