javascript - I need to remove the rel attribute mean value from script and instead the image id or any value -


i need remove rel value script , instead image id or value mean way generator rel attribute or remove or make way avoid attribute

html

text here close x

<article class="col img_prev2">   <img src="img/slideshow/slideshow2.jpg" alt="#img2" rel="1" class="thumb_main_page">   <h5>text here</h5> </article>  <article class="col img_prev2">   <img src="img/slideshow/slideshow3.jpg" alt="#img2" rel="2" class="thumb_main_page">    <h5>text here</h5>    <div id="img3" class="login-popup">   </div>  </article> 

script

var number = $(this).attr('rel');     number = parseint(number);     $('#carousel .slides li:nth-child(' + (number + 1) + ')').click();     $('#carousel').flexslider({         animation: "slide",         controlnav: false,         animationloop: false,         slideshow: false,         itemwidth: 105,         itemmargin: 5,         startat: number,         asnavfor: '#slider'     }); 

jquery .removeattr()

description: remove attribute each element in set of matched elements. 1

in case, basic form be:

$(img).removeattr('rel'); 

1 http://api.jquery.com/removeattr/


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -