View RSS Feed

Post a JavaScript

Custom, non DD related JavaScripts from other members.

  1. Full size object/iframe on a page; loads (a) menu(s)

    The text/html-object can be used to include HTML, except in IE, which doesn't support the object well yet, and where, as a consequence, we should still use an iframe for that purpose.

    How do we include HTML-menus (which are list-menus, normally)? As HTML-menus may have subitems, and as these subitems must be allowed to appear anywhere on the screen, an object or iframe containing the menu must have 100% size (as a principle, see below for certain restrictions).

    But ...

    Updated 03-21-2009 at 08:47 PM by molendijk (Bug in All Levels Navigational Menu)

    Categories
    Post a JavaScript
  2. Javascript Motion Effects Library

    I have created a motion effects library and aptly named it Javascript Motion Effects Library or the Jasme Library. I created it mainly to allow people to do complex effects with little code. Jasme works in firefox 3, safari, IE 7, and all other modern browsers. Jasme can move almost all variables of an object* and is very easy to use. When multiple actions are placed on the object, Jasme goes through a queue. You may use the library as long as you keep the label intact.Example1 Example2 Example3 ...
  3. DOM manipulation code

    Here's some of my personal DOM manipulation code:

    Code:
    Object.extend = function(o1, o2) {
      for (var x in o2)
        if (o2.hasOwnProperty(x))
          o1[x] = o2[x];
    
      return o1;
    };
    
    Object.extend(Object, {
      copy: function(o) {
        return Object.extend({}, o);
      },
    
      fromArray: function(o) {
        var r = {};
    
        Array.map(function(pair) { r[pair[0]] = pair[1]; }, a);
    ...

    Updated 04-06-2009 at 01:47 AM by Twey

    Tags: sssss Add / Edit Tags
    Categories
    Post a JavaScript , JavaScript & Ajax
  4. Generics in Javascript

    I just used this code to vent some frustration earlier, hope you all like it. It's pretty self-explanatory. It's probably too theoretical to go into the DD script archives, so I'll just leave it lying about here.

    Code:
    var Generic = (function() {
      var MATCH_FAIL = {},
          MATCH_ANY  = function() { return MATCH_ANY; };
    
      function create(fallback) {
        var s = function() {
          for (var i = 0, args = Array.prototype.slice.call(arguments),
    ...
Page 4 of 4 FirstFirst ... 234