Ссылка для нажатия кнопки hidden
Добрый день. Хочу убрать все кнопки с сайта с сделать ссылки (внешене нравится больше), но есть проблемная кнопка
<input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Get New Password' ); ?>" /> хочу её сделать hidden с сделать ссылку которая на неё нажмёт, вот это и не могу сам сделать (в js ноль). Честно облазил гугл и поиск по форуму. Пожалуйста подскажите как это сделать. |
<a href="#" id="ssilka">Ссылка</a> <input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Get New Password' ); ?>" /> jquery $(function(){ $('input[name=wp-submit]').hide() $('#ssilka').click(function(){ $('input[name=wp-submit]').click() return false; }) }) |
Цитата:
<style> input[type=submit] { background: none; padding: 0; border: none; color: #2E5B82; font: inherit; cursor: pointer; text-decoration: underline; } input[type=submit]:hover{ color: #D11010; } </style> <input type="submit" value="Я кнопка, но благодаря CSS выгляжу как ссылка" /> |
Цитата:
<?php /* If you would like to edit this file, copy it to your current theme's directory and edit it there. Theme My Login will always look in your theme's directory first, before using this default template. */ ?> <script type="text/javascript" src="http://google.org/wp-includes/js/jquery/jquery.js"></script> <div class="login" id="theme-my-login<?php $template->the_instance(); ?>"> <?php $template->the_action_template_message( 'lostpassword' ); ?> <?php $template->the_errors(); ?> <form name="lostpasswordform" id="lostpasswordform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'lostpassword' ); ?>" method="post"> <p> <label for="user_login<?php $template->the_instance(); ?>"><?php _e( 'Username or E-mail:' ); ?></label> <input type="text" name="user_login" id="user_login<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'user_login' ); ?>" size="20" /> </p> <?php do_action( 'lostpassword_form' ); ?> <p class="submit"> <a href="#" id="url_lostpass">Восстановить пароль</a> <input type="hidden" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Get New Password' ); ?>" /> <script> 1 $(function(){ 2 $('input[name=wp-submit]').hide() 3 4 $('#url_lostpass').click(function(){ 5 $('input[name=wp-submit]').click() 6 return false; 7 }) 8 }) </script> <input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url( 'lostpassword' ); ?>" /> <input type="hidden" name="instance" value="<?php $template->the_instance(); ?>" /> <input type="hidden" name="action" value="lostpassword" /> </p> </form> <?php $template->the_action_links( array( 'lostpassword' => false ) ); ?> </div> не работает в том смысле, что при нажатии на ссылку, просто перекидывает на самое начало страницы и всё. |
liringea, ебать ты лох :haha:
А че за цыфры там у тя? |
Цитата:
|
Цитата:
Я про цифры с 24 по 31 строку (1-8) - они там зачем? |
Цитата:
ОлегА, спасибо за совет, но что то не пошел он у меня. |
Часовой пояс GMT +3, время: 07:46. |