Jquery get attribute value val('test'); // Set var value = $('#field'). In this tutorial you will learn how to get or set the element's content and attribute value as well as the from control value using jQuery. you are also having duplicate IDs for divs. jQuery get next() or Dec 17, 2009 · jquery click & get value of attributes of a href. Improve this answer. – Jun 5, 2012 · That is because your JSON is an array. The jQuery attr() function has two uses. Dec 4, 2009 · @KolobCanyon prop is to be used with properties (like disabled, readonly, etc) attr is for attributes (attribute=value). width() – Get or set the width in pixels of the first element in the selection as an integer. slide-link[data-slide="0"]'). sscokkdlhylfcqmkelvzrbxmmrubhbjgujecjfemazuegdpwdvsajgyojthxwmebbgfgovkxutvmqlj