Whiles: Kulelu88: in the map i generate a new set of dom elements
Roches: From the template in the script
Frymyer: Then i set the text and push the result into an array
Silvius: Then i append all of it into the item List
Muddiman: Though as this happens on load it should prob use .html
Allbee: Https://jsfiddle.net/7camhnjt/7/
Jowell: Kulelu88: if you want to change what gets rendered into the row you modify line 2 in the html section
Schollmeier: Cork: so I do the formatting adjustments in the script tag on line 2 right?
Klingen: Note that if you remove the span you would have to modify the finder in the loop
Paschel: You should keep a dedicated element for the content of the task text for ease of modifying it
Wurts: Cork: the static solution displays each 1 as I I am trying to do, but making it static also eliminates the possibility of editing it. So I am guessing the issue here is to find the correct li styling for it
Klasen: Https://jsfiddle.net/7camhnjt/8/
Burgs: You prob need cl***=’editable’
Gurvine: Kulelu88: https://jsfiddle.net/7camhnjt/9/
Stepanski: Kulelu88: also note this version isn’t more static then the old solution
Mustafaa: Just better separated
Teakell: Https://jsfiddle.net/7camhnjt/10/ — moved the x into the li again
Bayani: Cork: seems static won’t work, as adding is broken now
Taliman: I haven’t modified adding
Petricka: You would have to change it to use the template
Hervol: Oh interesting, let me try doing that
Papiernik: The change i did was to get you started :
Petross: Cork: so all my adding/remove code will now look similar to the load code?
Toniatti: You don’t need the map as you only do one
Mermelstein: But for the rest, yes
Reynalds: So take the code from inside the map loop and run that separately
Mintreas: Then append the row you generate
Toure: I really need to brush up on the quirks on jquery after this 😛 thank you so much for the hand-holding Cork
Correl: Also much of what i did here isn’t explicit to jquery
Garant: It is just good javascript practises
Darmiento: Cork: would using angular/react have been easier?
Mealor: I wanted minimal dependencies
Vanacore: I managed to style it a bit better now Cork : https://jsfiddle.net/7camhnjt/11/
Ranieri: Kulelu88: nice, https://jsfiddle.net/7camhnjt/12/
Brickel: Now I just need to push the content to the left, button to the right haha
Hornbeak: I am trying to wrap my head around how to add an item now, but I am not sure. you said take the inner workings of .map, so I need to replace ALL the code?
Udell: Kulelu88: https://jsfiddle.net/7camhnjt/13/
Deshields: Kulelu88: https://jsfiddle.net/7camhnjt/14/
Roszales: Kulelu88: something like https://jsfiddle.net/7camhnjt/15/ ?
Lanosa: Yep, that’s perfect Cork ! thank you so much
Goes: Hey guys, anyone around?
Pellitteri: Http://codepen.io/anon/pen/VaNKBP?editors=1111 it no work
Freese: How is it you do ajax on page unload the top sugestion on google was async:false is that still the way to go? feels backwards.
Prochak: Strittmatter: the recommended solution is to not do it at all
Yavorsky: Strittmatter: what are you trying to do?
Muzacz: There is almost always other ways to accomplish the same thing
Allston: Free supply when user refreshes
Pryce: SpoonUltra: $”.names”.offset is a function not a property
Pock: No the way webshops do it it resev themselves form supply misscounts so if the don’t have an item in stock they backorder it but here the supply must always be the true value and when a user refreshes or hit back he loses his supply count