How to distinguish ENTER.

Schifko: Pazician: jquery and the browser works with dom tree, not html

Serres: So you don’t have closingtags

Kraack: Cork: I see, did you read my question and if you did, could you maybe have a solution for me?

Bellefleur: Pazician: i didn’t read the original question no

Berenguer: Cork: Hello everyone. I’ve 4 articles and now I want to add an wrapper before the first article and the last article if there’s more than 4 articles on the page, if there’s not more than 4 articles on the page then it should just ignore it, I’m trying out with .after and the .before but I can’t get it to work out. Also, I want to have the wrappers wrap every 4 article, since I’ve a row of them and I want some margin within every row

Lamirand: Cork: Alright, reading on it now – thank you so much!

Duba: Pazician: so $’article’.wrapAll’section’ for example

Termini: Is it possible, in a custom jquery plugin, to have multiple options, as in, options that pertain to CSS for the targeted object p***ed to the funcvtion, but then also set options for the children of the targeted object, for a gallery plugin kinda thing?

Demore: Cork: Thank you, I’ll try it out

Khatcherian: Why are you a$$hats helping Pazician and not me?

Leonhard: Thats not fair I came first 😛

Rodocker: That won’t get you any help lol

Westen: C0d3n4m3: depends on how you write the plugin

Tanious: Btw. I solved the problem

Delpino: So the user could set options for the targeted element, and then also set options for the children

Golia: C0d3n4m3: plugins can do most anything

Maberry: Though that said, you should keep your css out of js

Godboldt: It should be kept in the stylesheat

Gildore: I was hoping to be able to give the user the option to set the gallery items width/height

Maritato: I see what you mean though

Bowlin: Why not just have the css control that?

Fribley: Provide them with a small .css file with “defaults”

Balis: Then they can change it how ever they want

Pennywell: Nice idea. I was purely doing this in the plugin file, but thinking that way makes it a lot easier. :

Negreta: C0d3n4m3: have a look at how jquery-ui works

Godlove: They have a very clean implementation

Darwin: Ok : I’ll do that now

Rynes: They have one .css file for functionality no look and one set for theming

Scharmann: Js should handle adding dynamic elements and “functionality” the style should be cl***es nothing else

Mabane: Brilliant, I’ll check it out! : Muchos Gracias!

Lamkins: Cork: Alright, I tried the .wrapAll but I can’t get it to work, am I doing something wrong?

Palek: Pazician: make a jsfiddle including the article elements i don’t care about there content

Poudrier: Pazician: also the if case doesn’t look right

Dold: You want it to only add the wrapper if you have 8 articles?

Seman: I would drop the slice on line 1

Shumay: Cork: I want it to add the wrapper only if there’s more than 4 posts, so it it’s like 5 posts then it should add the wrapper, otherwise no – here’s the jsFiddle

Schatzle: Pazician:

Canny: Your code requires 9+ posts not 5+

Renk: As you first drop the first 4 posts

Kadis: And then check if what you have left is more then 4 posts

Naccarato: Cork: Alright, how can I add it to begin on every 4th posts?

Byars: Cork: Can I use nth-child or is there any other way?

Buttrey: I have textarea and I want to make it submitable with ENTER, but still allow user to make new line with SHIFT+ENTER

Clelland: How to distinguish ENTER and SHIFT+ENTER?