Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- делаем ссылку
- <a href="#" onclick="return blackfriday_chauth('/blackfriday/?anchor=blackfriday--forum')" style="text-decoration: underline;">авторизуйтесь</a>
- добавляем в код
- $(document).ready(function() {
- // если есть GET параметр anchor
- if (parseSecond('anchor')) {
- window.location.hash = '#'+ parseSecond('anchor');
- }
- });
- function parseSecond(val) {
- var result = "",
- tmp = [];
- var items = location.search.substr(1).split("&");
- for (var index = 0; index < items.length; index++) {
- tmp = items[index].split("=");
- if (tmp[0] === val) result = decodeURIComponent(tmp[1]);
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement