小编dix*_*kin的帖子

将外部JavaScript导入谷歌应用脚​​本

我正在尝试使用Google电子表格(Google Docs)中的Trello,我不确定如何导入/引用/链接使用其库所需的javascript文件.我唯一的另一个选择是直接使用他们的REST API(很好,但我宁愿使用他们的js助手类).

这是Trello需要我们使用的:

 <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
 <script src="https://api.trello.com/1/client.js?key=substitutewithyourapplicationkey"</script>
Run Code Online (Sandbox Code Playgroud)

如何在Google Apps脚本中导入/包含这些内容?

谢谢!!!

javascript google-apps-script trello

20
推荐指数
3
解决办法
1万
查看次数

iOS上的JQuery Mobile Scrolling并不顺畅

我有一个用JQuery 1.4编写的多页面应用程序,显示在iOS WebView中.它使用静态标头,内容有20个左右的嵌入图像和文本的div.我没有使用PhoneGap.

在WebView Safari中,我可以垂直滚动内容,但是我没有得到你在iOS应用程序中获得的相同的平滑度(即手指出现后滚动继续一点="平滑"滚动) .当我的手指离开屏幕时,滚动停止.

在JQuery Mobile中平滑滚动内容时,是否存在我不知道的设置或问题?

jquery smooth-scrolling ios

12
推荐指数
2
解决办法
2万
查看次数

iOS Facebook原生登录(不含Facebook SDK)

我正在尝试使用原生(iOS 6-7x)库从我的应用程序授权用户使用Facebook.登录成功后,我想将身份验证令牌传递给我的服务器.

下面的代码工作正常,除非用户没有在操作系统中设置他们的Facebook帐户.在这种情况下我收到以下错误:

Error Domain = com.apple.accounts Code = 6"无法完成操作.(com.apple.accounts错误6)

-(void) initFacebookLogin
{
    LRAppDelegate *appDelegate = [[UIApplication sharedApplication]delegate];

    if (appDelegate.accountStore == nil)
        appDelegate.accountStore = [[ACAccountStore alloc] init];

    __block ACAccount *facebookAccount = nil;

    ACAccountType *facebookAccountType = [appDelegate.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];

    NSArray * permissions = @[@"publish_stream", @"publish_actions", @"email"];

    NSMutableDictionary *options = [[NSMutableDictionary alloc] initWithObjectsAndKeys:FACEBOOK_APP_ID, ACFacebookAppIdKey, permissions, ACFacebookPermissionsKey, ACFacebookAudienceOnlyMe, ACFacebookAudienceKey, nil];

    [appDelegate.accountStore requestAccessToAccountsWithType:facebookAccountType
        options: options
        completion: ^(BOOL granted, NSError *error) {

           if ( granted )
           {
               NSArray *accounts = [appDelegate.accountStore accountsWithAccountType:facebookAccountType];

               facebookAccount = [accounts lastObject]; …
Run Code Online (Sandbox Code Playgroud)

facebook ios6 acaccountstore ios7

6
推荐指数
1
解决办法
3174
查看次数

在网格图像中使用Spritesheets的CSS动画(不是连续)

我正在尝试为精灵图像设置动画,并找到了这个很好的例子:

博客:http://simurai.com/blog/2012/12/03/step-animation/(已经屈服于linkrot).
Wayback Machine:http
://web.archive.org/web/20140208085706/http: //simurai.com/blog/2012/12/03/step-animation/ Code Fiddle:https: //codepen.io/simurai/笔/ tukwj

JSFiddle:http://jsfiddle.net/simurai/CGmCe/

.hi {
width: 50px;
height: 72px;
background-image: url("http://s.cdpn.io/79/sprite-steps.png");

-webkit-animation: play .8s steps(10) infinite;
   -moz-animation: play .8s steps(10) infinite;
    -ms-animation: play .8s steps(10) infinite;
     -o-animation: play .8s steps(10) infinite;
        animation: play .8s steps(10) infinite; }
Run Code Online (Sandbox Code Playgroud)

@ -webkit-keyframes play {from {background-position:0px; } {background-position:-500px; }}

@ -moz-keyframes play {from {background-position:0px; } {background-position:-500px; }}

@ -ms-keyframes play {from {background-position:0px; } {background-position:-500px; }}

@ -o-keyframes play …

css css3 css-animations

6
推荐指数
2
解决办法
6825
查看次数