omrehman omrehman - 1 year ago 93
jQuery Question

Jquery : how to get name of next element

I had written a jquery code

var next_element =$(this).next();

In a jquery event. But I got Ouput as
. why did it happens? if this is incorrect, how did i get the name of element next to the event happening ??

Answer Source

$('#qew').click(function() {

<script src=""></script>
<button id="qew">this</button>
<button name="that">that</button>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download