<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的更多相关文章

  1. [LeetCode] Move Zeroes 移动零

    Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ ...

  2. 记录一则ORACLE MOVE操作后重建索引过程被强制中断导致的ORA-8104案例

    环境:SunOS + Oracle 11.2.0.3   对部分表进行Move操作之后,未重建对应的索引,会导致ORA-1502 索引不可用. 此时需要用下面的查询拼接出重建不可用索引的sql语句: ...

  3. Error Domain=ASIHTTPRequestErrorDomain Code=8 "Failed to move file from"xxx/xxx"to"xxx/xxx"

    今天真的好高兴呀 我解决了一个折磨了我一周的问题,真的是激动地要哭出来了,为了这个问题,我嘴也烂了,头发抓了一地啊.虽然解决方法,最后还是展现出了“百度”的伟大,但是我还是很开心,在这里我展示一下我的 ...

  4. LeetCode:Move Zeroes

    LeetCode:Move Zeroes [问题再现] Given an array nums, write a function to move all 0's to the end of it w ...

  5. PHP中调用move_uploaded_file函数提示failed to open stream和 Unable to move

    在做一个PHP文件上传系统的时候,使用move_uploaded_file进行文件上传,提示下面两个warning,不能成功上传文件 Warning: move_uploaded_file(uploa ...

  6. Leetcode Move Zeros

    Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ ...

  7. svn更改分支名字,move命令

    名称 svn move — 移动一个文件或目录. 概要 svn move SRC DST 描述 这个命令移动文件或目录到你的工作拷贝或者是版本库. 提示 这个命令同svn copy加一个svn del ...

  8. 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 ...

  9. C++11 feature: move constructor

    There are heaps of good articles out there about C++ features including this move constructor. Howev ...

  10. [LintCode] Move Zeroes 移动零

    Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ ...

随机推荐

  1. Codeforces 527C Glass Carving

    vjudge 上题目链接:Glass Carving 题目大意: 一块 w * h 的玻璃,对其进行 n 次切割,每次切割都是垂直或者水平的,输出每次切割后最大单块玻璃的面积: 用两个 set 存储每 ...

  2. 转:UML类图几种关系的总结

    转自:http://www.open-open.com/lib/view/open1328059700311.html 在UML类图中,常见的有以下几种关系: 泛化(Generalization),  ...

  3. [Selenium] 使用Javascript选中Input框里的内容,然后清空

    当我们需要清空Input框里的内容,直接使用el.clear()方法又行不通时,可以使用Javascript先去选中内容,然后再使用el.clear()方法:

  4. Java常见错误

    1.NullPointerExceptin 空指针异常 a.引用没有初始化就使用 b.引用置空了,仍然被使用 2.IndexOutofBoundsException 下标越界 a.数组下标小于0 或者 ...

  5. [转]Android 使用Fragment界面向下跳转并一级级返回

      1.首先贴上项目结构图: 2.先添加一个接口文件BackHandledInterface.java,定义一个setSelectedFragment方法用于设置当前加载的Fragment在栈顶,主界 ...

  6. The Economist

      The turning point in the process of growing up is when you discover the core of strength within yo ...

  7. CentOS下安装setuptools、pip和virtualenv

    已经安装了Python,现在我们可以最终确定完成应用程序生产和部署的基础知识.为此,我们将设立两个最常用的工具:PIP封装经理和virtualenv中的环境管理. 一.安装setuptools set ...

  8. [redis] 征服Redis系列

    征服 Redis:简介+安装+调优+测试+主从+集群 征服 Redis + Jedis:简单Jedis+池化Jedis+集群Jedis 征服 Redis + Jedis + Spring (一)—— ...

  9. Objective-C:Foundation框架-常用类-NSDate

    直接上代码吧: #import <Foundation/Foundation.h> #pragma mark 日期创建 void dateCreate() { // date方法返回的就是 ...

  10. 个人介绍和GitHub

    基本信息: 姓名:陈晖 学号:1413042068 班级:网工143 兴趣爱好:看小说,打游戏,听古风音乐,打羽毛球,骑行等 个人编程能力不高,写的代码都是作业…… GitHub注册流程: 对于Git ...