move
<span id="span{{$index}}" ng-click="goTab({{$index}})" ng-class="{tabFont:selectIndex==$index?true:false}" style="padding:0 10px;" ng-repeat="tab in [1,2,3,4,5,6,7,8]" >{{tab}}
{{tab}}{{tab}} Ame.Cuisine{{tab}}{{tab}} </span>
$scope.selectIndex=index;
var element=document.getElementById("span"+index);
var start=element.offsetLeft;
var end=element.offsetWidth;
var selfWidth=document.getElementById("span"+index).clientWidth;
var contentWidth=document.documentElement.clientWidth;
if(start==0){
$ionicScrollDelegate.scrollTo(0, 0, true);
}else {
$ionicScrollDelegate.scrollTo(start-end, 0, true);
}/*else if(start>=contentWidth){
$ionicScrollDelegate.scrollTo(contentWidth, 0, true);
}else if(start>=(contentWidth/2)){
$ionicScrollDelegate.scrollTo(contentWidth/2, 0, true);
}*/
}
move的更多相关文章
- [LeetCode] Move Zeroes 移动零
Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ ...
- 记录一则ORACLE MOVE操作后重建索引过程被强制中断导致的ORA-8104案例
环境:SunOS + Oracle 11.2.0.3 对部分表进行Move操作之后,未重建对应的索引,会导致ORA-1502 索引不可用. 此时需要用下面的查询拼接出重建不可用索引的sql语句: ...
- Error Domain=ASIHTTPRequestErrorDomain Code=8 "Failed to move file from"xxx/xxx"to"xxx/xxx"
今天真的好高兴呀 我解决了一个折磨了我一周的问题,真的是激动地要哭出来了,为了这个问题,我嘴也烂了,头发抓了一地啊.虽然解决方法,最后还是展现出了“百度”的伟大,但是我还是很开心,在这里我展示一下我的 ...
- LeetCode:Move Zeroes
LeetCode:Move Zeroes [问题再现] Given an array nums, write a function to move all 0's to the end of it w ...
- PHP中调用move_uploaded_file函数提示failed to open stream和 Unable to move
在做一个PHP文件上传系统的时候,使用move_uploaded_file进行文件上传,提示下面两个warning,不能成功上传文件 Warning: move_uploaded_file(uploa ...
- Leetcode Move Zeros
Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ ...
- svn更改分支名字,move命令
名称 svn move — 移动一个文件或目录. 概要 svn move SRC DST 描述 这个命令移动文件或目录到你的工作拷贝或者是版本库. 提示 这个命令同svn copy加一个svn del ...
- LeetCode 283 Move Zeros
Problem: Given an array nums, write a function to move all 0's to the end of it while maintaining th ...
- C++11 feature: move constructor
There are heaps of good articles out there about C++ features including this move constructor. Howev ...
- [LintCode] Move Zeroes 移动零
Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ ...
随机推荐
- Java Socket编程----通信是这样炼成的
Java最初是作为网络编程语言出现的,其对网络提供了高度的支持,使得客户端和服务器的沟通变成了现实,而在网络编程中,使用最多的就是Socket.像大家熟悉的QQ.MSN都使用了Socket相关的技术. ...
- Android ViewPager更新数据
ViewPager也是一个常用的组件 与ListView类似 当绑定数据后 想刷新数据 需要在适配器中添加如下方法 protected PagerAdapter galleryAdapter = ne ...
- Js_动画显示背景图片
jAni是一个可以动画显示背景图片的jQuery插件.这个插件基本上是GIF动画的一个替代品,但是他有他的好处.所有浏览器都支持GIF形式的动画格式,而且也不需要额外的javaScript代码和标记. ...
- Eclipse安装SVN插件总结
1.下载最新的Eclipse,我的版本是3.7.2 indigo(Eclipse IDE for Java EE Developers)版 如果没有安装的请到这里下载安装:http://ecli ...
- python 图实现
#coding:utf-8 __author__ = 'similarface' class Graph: def __init__(self,label,extra=None): #节点是类实例 s ...
- HMM隐马尔科夫模型
这是一个非常重要的模型,凡是学统计学.机器学习.数据挖掘的人都应该彻底搞懂. python包: hmmlearn 0.2.0 https://github.com/hmmlearn/hmmlearn ...
- 第二章 Python基本元素:数字、字符串和变量
Python有哪些内置的数据类型: True False #布尔型 42 100000000 #整型 3.14159 1.0e8 #浮点型 abcdes #字符串 2.1 变量.名字和对象 pytho ...
- eclipse ssh连接sqlserver express
public static String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; public stati ...
- c语言数据结构:01背包问题-------动态规划
两天的时间都在学习动态规划:小作业(01背包问题:) 数据结构老师布置的这个小作业还真是让人伤头脑,自己实在想不出来了便去网上寻找讲解,看到一篇不错的文章: http://www.cnblogs.co ...
- js键盘操作事件
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...