在一个空HTML页面中,我尝试显示一个包含我的应用程序链接的横幅
我用它作为教程:http://www.dunnsolutions.com/content/application-development-blog/-/blogs/smart-app-banners-for-ios-and-android
目前,我只是尝试使它在本地工作,在一个空的页面。这是我的页面:
<html>
<head>
<title>Hulu Plus</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="author" content="Hulu LLC">
<meta name="google-play-app" content="app-id=MyAppIdIsHere">
<link rel="stylesheet" href="jquery.smartbanner.css" type="text/css" media="screen">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="jquery.smartbanner.js"></script>
<script type="text/javascript">
$(function () {
$.smartbanner({
title: 'Audience Opinion',
author: 'Dunn Solutions Group'
});
})
</script>
</head>
<body>
</body>
</html>我的html页面和js/css文件位于同一个文件夹中。没有路的问题。
有人知道为什么这个代码不起作用吗?提前感谢!
发布于 2014-09-04 18:55:04
默认选项是只在Android或iOS设备上显示条形图。如果在桌面上打开页面,则不会显示任何内容。您可以将“强制”选项设置为“windows”,以便将其显示在桌面上。
$(function () { $.smartbanner({ daysHidden: 0, daysReminder: 0, title:'Hulu', force:'windows' }) })所有其他选项都可以在github页面上找到:https://github.com/jasny/jquery.smartbanner
https://stackoverflow.com/questions/23784878
复制相似问题