简体   繁体   中英

how to use onclick jQuery event for class

How to write oncick event in jQuery for button click and the value should store in cookies in php.

I am new to session and cookies.

EX: Link A Link B

If Link A clicked corresponding A form should appears. If Link B clicked corresponding B form should appears.

<script type="text/javascript" src="templates/tmpl_Social/js/jquery.js"></script>
<script>
 $(document).ready(function() {
     $("social_conn1").click(function() {});
 });
</script>
<div class="social_conn1">
    <a rel="nofollow" href="modules/?r=deanos_facebook_connect/login_form"><img border="0" src="">TEACHER SIGNUP</a>
</div>
<div class="social_conn1" style="text-align: center; margin-top: 8px;">
    <a rel="nofollow" href="modules/?r=deanos_facebook_connect/login_form"><img border="0" src="">STUDENT SIGNUP</a>
</div>

From the above two links, one for teacher sign up form and another for student signup form, both have different fields. I need if user click teacher sign up means teacher form will open,if student means student form will appears. I need to differentiate weather they sign up by teacher or student. for that how to use cookies in php.

您缺少“。”

$(".social_conn1").click(function() {});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM