I have an HTML string representing an element: '<li>text</li>'. I'd like to append it to an element in the DOM (a ul in my case). How can I do this with Prototype or with DOM methods?  (I know i could do this easily in jQuer...
Does anybody know of a method to trigger an event in Prototype, as you can with jQuery's trigger function?  I have bound an event listener using the observe method, but I would also like to be able to fire the event programatically.  Thanks in...
In an application where certain elements have custom CSS properties, is there any way to retrieve such a value via JavaScript?  e.g.  <div id="myDiv" style="color:#f00;-my-custom-property:upsidedown;" />   I can access the col...
We're using Prototype for all of our Ajax request handling and to keep things simple we simple render HTML content which is then assigned to the appropriate div using the following function:  function ajaxModify(controller, parameters, div_id) {...
I have this class where I am using a combination of jQuery and Prototype:  var MyClass = Class.create({     initElements: function(sumEl) {        this.sumEl = sumEl;        sumEl.keyup(this.updateSumHandler);     },      updateSumHandler: function(e...
I've got an HTML page (the parent) with an embedded IFRAME. The parent page has a couple of event listeners for mouse and keyboard events, as shown below (I'm using the Prototype library).   var IdleMonitor = Class.create({      active: null,...
In prototype or normal-but-cross-browser-compatible Javascript, how do I move the contents of a div to the contents of another div?  Inside the div is a form with ids and dependent Javascript code with event observers. I don't want this to break...
I know there is a Hash() object in the Javascript prototype framework, but is there anything in Jquery like this?  As I would like to stick with one javascript framework, rather than mixing the Prototype Frame work and the JQuery framework and use at...
Is it possible to have focus events bubble in protoype?  I am trying to prevent having to assign an observer on every input element.   <script language="javascript" type="text/javascript"> document.observe('dom:loaded',...
I'm trying to create a continually rotating banner for the top of the homepage of a site I'm developing. The best way that I can figure to keep it constantly in rotation is to take the first DIV (firstChild) and move it to the end of the stac...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.