简体   繁体   中英

Open div with link JQuery or Javascript in PHP

is there a way to create button/links in email body to open/show hidden divs using javascript or jquery on my home page index.php page? I want to send links (button) in email to my users so they can open the div they want. Example: Login code Here hidden Signup code Here hidden

I want two buttons:to show selected div Login OR using Login Signup

My user should able to select any of these button to open related div from their email directly.

Is it possible? Thanks in advance.

You could do something based on the URL parameters:

Javascript (with jQuery):

if(location.search == "?show_div=1"){
    $('#login_div').show();
}

HTML:

<div id="login_div" style="display: none;">...</div>

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