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 ...
随机推荐
- Python学习笔记--XML的应用
XML的定义 XML 指可扩展标记语言(EXtensible Markup Language) XML 是一种标记语言,很类似 HTML XML 的设计宗旨是传输数据,而非显示数据 XML 标签没有被 ...
- Traffic Sign Recognition with Multi-Scale Convolutional Networks
总结一下文中几点值得学习的地方: 1,卷积神经网络的结构图:Multi-Scale Features. 因为它提取的特征的分层的,对吧,虽然最后 一层可以提供全局信息,但是呢,前面的几层可以提供更 ...
- JavaSE复习_11 IO流复习
△FileReader是使用默认码表读取文件, 如果需要使用指定码表读取, 那么可以使用InputStreamReader(字节流,编码表) FileWriter是使用默认码表写出文件, 如果需 ...
- HTML5 学习笔记--------》HTML5概要与新增标签!
一.HTML5概要 1.1.为什么需要HTML5 HTML4陈旧不能满足日益发展的互联网需要,特别是移动互联网.为了增强浏览器功能Flash被广泛使用,但安全与稳定堪忧,不适合在移动端使用(耗电. ...
- Java 13 字符串
1 String对象不可变 每一个修改String值的方法 实际上都是创建一个全新的String对象 public class Immutable { public static String upc ...
- Android布局_网格布局GirdLayout
自Android4.0版本后新增的GirdLayout网格布局(API 14) <?xml version="1.0" encoding="utf-8"? ...
- 简单ssh框架整合
Struts2+Spring4 +Hibernate4 首先看看建立项目的框架 第一步 建立web项目 第二步 导入相对应需要的jar包(放在项目WEB-INFO/lib下) 需要导入Spring ...
- xmpp4-总览
1注意点 创建的聊天室本地缓存,和服务器存储有时不同步,似乎聊过天就更稳定一点.
- iOS开发 cocoapods的安装以及使用
一.概要 iOS开发时,项目中会引用许多第三方库,CocoaPods(https://github.com/CocoaPods/CocoaPods)可以用来方便的统一管理这些第三方库(从一个坑出来,又 ...
- 解决Tomcat: Can't load IA 32-bit .dll on a AMD 64-bit platform问题
http://201209235316.iteye.com/blog/2063853 http://www.cnblogs.com/liuyp-ken/p/5503822.html