Category: Javascript /Jquery / React / Bootstrap / Web

JavaScript 语言基础知识点总结(思维导图)

目录[-] (1)javascript 数组 (2)函数基础 (3)运算符 (4)流程语句 (5)正则表达式 (6)字符串函数 (7)数据类型 (8)变量 (9)window 对象 (10)DOM基本操作 (11)一图知晓整个Javascript ES5语法 推荐阅读:   (1)javascript 数组   (2)函数基础   (3)运算符   (4)流程语句   (5)正则表达式   (6)字符串函数   (7)数据类型   (8)变量   (9)window 对象   (10)DOM基本操作   (11)一图知晓整个Javascript ES5语法 &n… Read More

jQuery: 判断指针是否在某元素内 How do I check if the mouse is over an element

代码: // required jquery.min.js $(function() { var $current_tab_menu = $('#main_menu'); $(document).on('mouseover',function(e) { var xx = e.originalEvent.x || e.originalEvent.layerX || 0; var yy = e.originalEvent.y || e.originalEvent.layerY || 0; if($current_tab_menu && $('.has_submenu:hover').length === 0) { console.log(($cur… Read More

jquery mobile : 外链接失效 a href not working

1. 根据文档 http://view.jquerymobile.com/master/demos/,可以在 <a> 标签里面添加属性rel="external" 或者 data-ajax="false" 2. 如果无法直接添加,也可以使用js效果: $(document).ready(function(){ $("a").each(function(){ $(this).attr("rel","external"); }); }); 当然,如果你的代码中使用了一些特别属性,如下: <a href="#popupBasic" data-rel="popup">Open Popup</a> <… Read More

jQuery Zoom 图片聚焦或者点击放大A plugin to enlarge images on touch, click, or mouseover

下载: zoom-master 项目地址: https://github.com/jackmoore/zoom Compatible with: jQuery 1.7+ in Chrome, Firefox, Safari, Opera, Internet Explorer 7+. Install via NPM npm install jquery-zoom Instructions Zoom appends html inside the element it is assigned to, so that element has to be able to accept html, like <a>, <span>, <li>, <div… Read More

Bootstrap 3 : 侧边菜单插件 Sliding Side Menu/Panel with jQuery and Bootstrap – BootSideMenu

A simple lightweight javascript plugin used to create side menus/panels that smoothly slide out from the edge of your screen when toggled, built with jQuery and Bootstrap 3. How to use it: 1. Load the Bootstrap’s stylesheet and BootSideMenu.css in the head section of the web page. <link rel="stylesheet" href="//netdna.bootstrapcdn.com/boo… Read More