jQuery click event on radio button

<!DOCTYPE html>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js”></script&gt;
var id=$(this).attr(‘id’);


<input type=”radio” name=”test” class=”radio” id=”textbox”>url<br/>
<input type=”radio” name=”test” class=”radio” id=”fileupload”>uplaod

<div id=”dtextbox” style=”display:none” class=”dd”>
<input type=”text” name=”url”>

<div id=”dfileupload” style=”display:none” class=”dd”>
<input type=”file” name=”img”>


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s