jQuery--index() window.onhashchange
index():
1. 如果没有参数传给该函数,那么就返回一个整数,为其相对于其兄弟节点的位置。
2. 如果在一个元素集合上调用该函数,并且传入的参数为一个DOM元素或jQuery对象,那么返回一个整数,为传入的元素相对于原集合的位置。
3. 如果传入一个字符串的参数作为selector给该函数,那么返回一个整数,为其在所有匹配传入的selector的元素中的位置。
注:1和3中的其代指调用该函数的元素。
window.onhashchange:
window.location.hash 设置或获取 href 属性中在井号“#”后面的分段。
window.onhashchange 在当前的url的hash值发生改变时触发。
用于含有tab切换的页面。
jQuery--index() window.onhashchange的更多相关文章
- jQuery EasyUI window窗口实例
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>j ...
- JQuery 在$(window).load() 事件中 不运行 $(window).resize()
本文转载至: http://stackoverflow.com/questions/2597152/jquery-window-resize-doesnt-work-on-load 原文标题 :J ...
- jQuery的$(window).load与、(document).ready和window.onload的关系
jQuery的$(window).load与.(document).ready和window.onload的关系 $(function() { console.log('document.ready ...
- 捕获浏览器的前进、后退事件 window.onhashchange 并区别于点击链接
<html> <head> <meta http-equiv="content-type" content="text/html;chars ...
- jQuery EasyUI window窗口使用实例
需求:点击[增加]按钮,弹出窗口,并对所有输入项内容进行校验,校验通过就提交给后台的action处理,没有通过校验就弹窗提示. <!DOCTYPE html> <html> ...
- jQuery index()
index() index() 方法返回指定元素相对于其他指定元素的 index 位置. 语法 $(selector1).index(selector2) selector2:可选,指定元素:为空时默 ...
- 【jQuery】window.onload 和 $(document).ready() 的区别
... 在Stack Overflow上看到了这个问题,自己翻译了过来. The onload event is a standard event in the DOM, while the read ...
- jQuery document window load ready 区别详解
用过JavaScript的童鞋,应该知道window对象和document对象,也应该听说过load事件和ready事件,小菜当然也知道,而且自认为很了解,直到最近出了问题,才知道事情并不是那么简单. ...
- jquery index()方法
搜索匹配的元素,并返回相应元素的索引值,从0开始计数. 如果不给 .index() 方法传递参数,那么返回值就是这个jQuery对象集合中第一个元素相对于其同辈元素的位置. 如果参数是一 ...
随机推荐
- C# XmlSerializer实现序列化浅析
C# XmlSerializer类是实现序列化的一个类,那么关于C# XmlSerializer的学习我们要掌握怎么样的操作方法呢?那么这里向你详细介绍具体的操作细节情况. C# XmlSeriali ...
- linux deepin-scrot 截图工具
1.下载 .deb 安装包: 点击这里 (如果提示缺少依赖,去终端安装相应的依赖) 2. 设置快捷键Alt+Ctrl+A 1. 系统设置 -> 键盘设置 -> 自定义快捷键 -> ...
- 【Nginx】配置Nginx的负载均衡
参考的优秀文章 tomcat配置文件server.xml详解 AJP协议总结与分析 Using nginx as HTTP load balancer 在本机运行2个Tomcat 现需要运行两个Tom ...
- HTML标签的应用(新手)
雪碧图(精灵图): sprite compass-合并(尽量宽高相同) 兼容性: 1.resct重置技术:normalize技术 2.加前缀:-webkit- -moz- -0- -ms- 3.< ...
- mysql中查询语句中的一个知识点说明
1, 简单说明. select * from tb_name where 1[不为零即可];则会显示所有记录,select * from tb_name where 0;则不显示任何记录 假设数据库中 ...
- 使用R进行倾向得分匹配
pacman::p_load(knitr, wakefield, MatchIt, tableone, captioner)set.seed(1234)library(wakefield)df.pat ...
- 12.NFS搭建配置
参考博客:http://www.cnblogs.com/mchina/archive/2013/01/03/2840040.html 1.关闭防火墙和SELINUX $ service iptable ...
- centos jenkins
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo rpm --import htt ...
- python_way ,day25 CMDB_models (数据库设计)
from django.db import models from django.contrib.auth.models import User # Create your models here. ...
- SQL SERVER建库&用户赋权限
create database ServiceDB on primary ( name='ServiceDB_data', -- 主数据文件的逻辑名称 filename='D:\WebRoot\DB\ ...