I'm trying to define an area in a jQuery snippet which is easy to change the user's last goal That user defines the values, but jQuery will create objects from the list.
I start with this simple HTML div:
& lt; Div class = "slider-container" & gt; & Lt; / Div & gt; followed by JS concept:
var newSlides = []; $ ("Slider-container") Each (function () {newSlides.push ({image: {url: "http://placekitten.com/960/400", title: "sample title 1", subtitle: "sample subtitle 1"}, image: { Url: "http://placekitten.com/961/401", title: "sample title 2"};});}); I would like to be able to take these values and do this:
var index = 1; $ ("Slider-container") Attached ($ (", {class:" slide s- "+ Index ++}) .append ($ (" & lt; img / & gt;, {src: "Url- From-top "})) .append ($ (" , {class: "slide-titles"}) .append ($ ("(lt; h2 / & gt;, {class: Title "). Text (" Text-To-Top ") .append ($ (" & lt; h3 / ", {class:" subtitle "}). Text (" Text-To-Top ")) ) so that the end result will be:
No comments:
Post a Comment