Hi, I’m just testing a.

 
Lapinski: This inside the even handler does not refer to the ‘this’ of plugin

Asman: And remove that self = this line

Asman: Vincentgabriel: but plugin does

Asman: And doing plugin.removeSelectedItem.callplugin does the same as plugin.removeSelectedItem

Crigger: Shoky: thank you. doing that, now inside removeSelectedItem console.logplugin returns undefined

Asman: Vincentgabriel: right it’s not defined there. just use this there

Asman: Or. var plugin = this; like you’re doing in registerEvents

Asman: RemoveSelectedItem is not the event handler, btw

Pernesky: RemoveSelectedItem its not?

Asman: No, the function { . on line 31 is the event handler

Asman: The function you p*** to .on

Hartung: Hi. all good morning!

Dibari: How do you call removeSelectedItem then?

Asman: Just a function. or a method on the plugin instances

Asman: If you p*** remoevSelectedItem to .on directly, then it will be the event handler ;p

Molette: OK, is there a way to make it shorter like plugin.$element.on’click’, ‘button.remove-selected’, plugin.removeSelectedItem; and stil have this work inside removeselecteditem?

Asman: Yea, e.g. with bind plugin.removeSelectedItem.bindplugin

Staub: Plugin.$element.on’click’, ‘button.remove-selected’, plugin.removeSelectedItem.bindplugin;

Marcelli: One more, how would i refer to the actual button clicked inside removeSelectedItem?

Carosella: Should i use the event.target ?

Asman: Vincentgabriel: event.currentTarget would be safer, but yea. of course, you can also store the button reference on the plugin instance and just access that

Moskwa: Thanks, event.currentTarget seems to work

Shiverdecker: What is this lint warning?

Torruellas: Https://www.irccloud.com/pastebin/enki9ewP/

Tzeremes: Hey everyone. I have a question: Is it possible to do like a ‘cut and paste’ of elements to move them into diffrent containers? such as in mobile mode i want to move my header navigation into another submenu so it can all be part of the mobile nav

Ihm: Appending an existing element will move it

Stancle: How do i remove it from one and place it in another though taplar

Ihm: An Element can only belong to one parent

Ihm: So appending it to something else detaches it from the original

Ragan: Sweet, thanks, anyway to be specific on where you place it, or only prepend and append?

Marseille: Like what if i awnt it want the first p in a containre

Ihm: Any of those, append, prepend, insertBefore, insertAfter, etc.

Ihm: What do you mean first p in a container? selecting it, or putting that p as the first element?

Fasone: Like divp./p i want to place it here/div for example

Ihm: Is there other stuff after the p?

Chhom: So basically in the midle of something

Brayboy: Sweet, insertAfter i will make note of that

Hille: How’s everyone’s day going?

Pomiecko: Pretty sweet here, just resolved an issue with one of my jekyll installations

Vajgrt: Good, testing out discussion as potential prior art to invalidate a software patent

Atherton: Fiord jekyll is cute isn’t it? 😀

Pomiecko: Veggie_ yea! I’ve been playing around with it for a few years but only recently actually built a few full sites with it

Dey: That’s true. There are loads of things to explore.

Pomiecko: Yea, I’m a ****er for a minimal text/CLI-based workflow, so it fits well into my life

Hodan: Show me what you built.

Chavaria: Hi, I’m just testing a devel web service running locally, so I just called $.getJSON for it, problem is that chrome browser is getting me the error: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://devel:8080’ is therefore not allowed access., there is a way to trick the browser ?