Results tagged prototype 1.6

With prototype 1.6 being released it has left some abilities, classes, functions, or methods behind. One of those depreciated classes is the Insertion class which was replaced with insert(). insert allows you to insert content into your documents. That content can be either text, HTML, a DOM Element, or any type of object with a toHTML or toElement method. The content can be placed using a parameter of bottom, top, before, or after value. Let's try it.

First we are going to create a function and call it myFunction and a new String object which we will use for our insert.

    function myFunction() {

        var test = "This is a new String.";
   
    }

Now let's create an instance of our insert class.

    new Element.insert('myDiv', {top:test});

So now our script looks like this

BMW, Toyota, BMW, Saab, Audi, Nissan Mercedes, BMW, Nissan, Honda, BMW, BMW, BMW, BMW, Acura, Honda, Acura Forerunner, SUV, BMW, Mercedes, Toyota
| | Comments (1) | TrackBacks (0)
BMW, Toyota, BMW, Saab, Audi, Nissan Mercedes, BMW, Nissan, Honda, BMW, BMW, BMW, BMW, Acura, Honda, Acura Forerunner, SUV, BMW, Mercedes, Toyota BMW, Toyota, BMW, Saab, Audi, Nissan Mercedes, BMW, Nissan, Honda, BMW, BMW, BMW, BMW, Acura, Honda, Acura Forerunner, SUV, BMW, Mercedes, Toyota


Chicago Blackhawks
Chicago Blackhawks
Stanley Cup
Stanley Cup
Pittsburgh Penguins
Pittsburgh Penguins
Boston Bruins
Boston Bruins
Fire & Flames
Fire & Flames








 


Categories

BMW, Toyota, BMW, Saab, Audi, Nissan Mercedes, BMW, Nissan, Honda, Acura, Honda, Acura Forerunner,bmw bmw bmw SUV, BMW, Mercedes, Toyota