0

PureScript's purescript-jquery package supports this

before :: JQuery -> JQuery -> Effect Unit

method, which "Inserts an element before another" as shown in its documentation on pursuit.

Is there a similar function somewhere, which inserts an element after another?

I do not see such a method documented on Pursuit. If it does not exist, then how might I implement the same effect?

glennsl
  • 28,186
  • 12
  • 57
  • 75
mherzl
  • 5,624
  • 6
  • 34
  • 75

1 Answers1

1

I have very little experience with PureScript and its FFI, but just looking at the implementation of before:

foreign import before :: JQuery -> JQuery -> Effect Unit

I'm going to take a wild stab at this being what you want:

foreign import after :: JQuery -> JQuery -> Effect Unit

and then in a corresponding js file for your module:

exports.after = function(ob) {
    return function(ob1) {
        return function() {
            ob1.after(ob);
        };
    };
};
glennsl
  • 28,186
  • 12
  • 57
  • 75