首页 \ 问答 \ 桌面浏览器上的jquery移动按钮(jquery mobile buttons on desktop browser)

桌面浏览器上的jquery移动按钮(jquery mobile buttons on desktop browser)

是否可以将某些按钮的jquery移动外观添加到桌面浏览器上?

我包含了jquery移动css和js文件,当我点击按钮时,它正在做一些幕后的东西而不是实际上把我带到我的目的地。 当我删除JS(桌面上的奇怪行为的原因)时,按钮,按预期,不会按照我想要的方式呈现。

理想情况下,我想看到纯css和简化的JS渲染按钮,以便我可以将它添加到我的桌面布局,如果这是一个选项,以某种方式,这将适用于我的目的。

我真的不想挖掘所有的jquery移动js文件,并弄清楚那里发生了什么事情。

我怎样才能理解我需要在桌面上呈现我的按钮,其外观和感觉与没有移动设备功能的移动设备相同。

编辑以下答案:

这就是我现在在桌面页面上调用的内容:

<link href="/Content/jquery.mobile.custom.structure.min.css" rel="stylesheet" type="text/css" />
<link href="/Content/jquery.mobile.custom.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/content/mobile/themes/LS.min.css" />
<script src="/Scripts/jquery.mobile.custom.min.js"></script>

并调用这样的按钮:

        <a data-role="button" data-theme="a" href="/home/foldit" data-icon="star">
                Fold It
        </a>

这显示了我的按钮的文本表示,而不是呈现按钮。 我没有从包中包含的唯一文件是“自定义主题”css文件,因为我认为我的主题应该替换它。 (LS.min.css文件)。


is it possible to add the jquery mobile look and feel of some buttons onto a desktop browser?

I included the jquery mobile css and js files and when I click the button, it's doing some behind the scenes stuff and not actually taking me to my destination. When I remove the JS (the cause of the strange behavior on the desktop), the button, as expected, doesn't get rendered the way I want it to.

Ideally, I'd like to just see the pure css and simplified JS that's rendering the button so that I can just add it to my desktop layout, and if that's an option to do somehow, that would work for my purposes.

I really don't want to have to dig through all of the jquery mobile js files and figure out what is going on there to piece this together though.

how can I just pare out what I need to have my buttons rendered on the desktop with the same look/feel as the mobile device w/o the mobile device functionality.

Edit for answer below:

this is what I"m calling now on my desktop page:

<link href="/Content/jquery.mobile.custom.structure.min.css" rel="stylesheet" type="text/css" />
<link href="/Content/jquery.mobile.custom.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/content/mobile/themes/LS.min.css" />
<script src="/Scripts/jquery.mobile.custom.min.js"></script>

and calling the button like this:

        <a data-role="button" data-theme="a" href="/home/foldit" data-icon="star">
                Fold It
        </a>

this is showing a textual representation of my button, not rendering the button. the only file I didn't include from the package is the "custom theme" css file because I figured that my theme should replace that. (the LS.min.css file).


原文:https://stackoverflow.com/questions/13885711
更新时间:2023-01-29 11:01

最满意答案

上面的代码不起作用,因为直到测试只验证结果是否为空。 Test-NetConnection总是返回一个对象(即使以false作为状态),所以测试将始终为“true”,这意味着,无论结果如何,您的do { }脚本块只会运行一次。 一种解决方案是让直到测试检查返回的属性之一,如下所示:

do {
  Write-Host "waiting..."
  sleep 3      
} until(Test-NetConnection $HOST -Port PORT | ? { $_.TcpTestSucceeded } )

The code above doesn't work because the until test only verifies if the result is not null. Test-NetConnection always returns an object(even with false as a status), so the test would always be "true", which means that your do { } scriptblock would only run once no matter what the result is. One solution would be to make the until test check one of the properties returned, like this:

do {
  Write-Host "waiting..."
  sleep 3      
} until(Test-NetConnection $HOST -Port PORT | ? { $_.TcpTestSucceeded } )

相关问答

更多
  • 这个答案正好说明了我想以非常简单的方式获得的内容。 这个想法是在主机上有不同的IP地址,例如在单个网络接口上使用IP别名 ,然后启动每个容器, 指定IP地址 ,除了暴露的端口之外 ,它们可以到达的地方(请参阅链接的答案一个例子)。 This answer explain exactly what I want to obtain in a very simple way. The idea is to have different IP addresses on the host machine, for ...
  • 您可以使用getsockname函数作为本地端口和地址,远程端口使用getpeername ,如下所示 function GetLocalSocketPort ( s : TSocket ) : Integer; var Addr : TSockAddrIn; Size: integer; begin Size := sizeof(Addr); getsockname(s, Addr, Size); Result := ntohs(Addr.sin_po ...
  • 上面的代码不起作用,因为直到测试只验证结果是否为空。 Test-NetConnection总是返回一个对象(即使以false作为状态),所以测试将始终为“true”,这意味着,无论结果如何,您的do { }脚本块只会运行一次。 一种解决方案是让直到测试检查返回的属性之一,如下所示: do { Write-Host "waiting..." sleep 3 } until(Test-NetConnection $HOST -Port PORT | ? { $_.TcpTestSucceed ...
  • 如果S是服务器,那么就这样做 conn, addr = s.accept() 否则,如果C不知道任何关于S的问题这里有一个解决方案问题:你应该使用一个中间服务器来解决你的通信问题。 C连接到服务器并发送其外部端口号(服务器自动知道IPe)。 服务器存储IPe和Pe。 S向服务器询问C并获取IPe和Pe。 然后S可以自己联系C. 需求: TCP连接 S和C是客户端 中间服务器 注意:秘密是C和S都知道服务器。 If S is the server then just do conn, addr = s. ...
  • 如果要通过端口8004从Internet访问django dev服务器,请尝试: manage.py runserver 0.0.0.0:8004 开发服务器默认只在127.0.0.1上侦听。 但是,如果通过Nginx访问开发服务器,即连接到your.domain.com:80 ,则不需your.domain.com:80 。 在这种情况下,Nginx将充当代理,将请求传递给开发服务器。 顺便说一句,您可以在启动实例后编辑现有安全组的规则,这非常有效。 To answer my own question ...
  • 您需要在不同的线程中进行GUI和通信。 当套接字例如等待某些数据时,GUI被阻止。 您可以使用QT的信号/插槽连接两个线程。 例如,Example是GUI的类。 MyThread将在另一个线程中运行,并且每隔一秒调用一个Example的插槽。 从PyQt4导入QtGui导入sys,QtCore导入时导入线程 class Example(QtGui.QWidget): def __init__(self): super(Example, self).__init__() ...
  • 服务器不会说HTTP,并且你告诉curl它的一个http url。 因为它不是HTTP服务器,所以不要试图用它来说HTTP。 这就是你在这里做错了什么(你告诉curl它是一个HTTP URL,并且curl尝试与服务器说HTTP)。 它似乎只是说TCP / ASCII(或UTF-8?)XML,所以试试。 $sock=socket_create(AF_INET,SOCK_STREAM,SOL_TCP); socket_connect($sock,'90.179.113.54',5500); socket_wri ...
  • 为了验证数字是否在可接受的范围内,正则表达式必须非常可笑。 相反,我会用这个: function validateIpAndPort(input) { var parts = input.split(":"); var ip = parts[0].split("."); var port = parts[1]; return validateNum(port, 1, 65535) && ip.length == 4 && ip.every(fu ...
  • 根据你想要的输出来判断,你的循环不应该看起来像这样吗? for fourthoctet in range (1,256): for portnum in range (portstart, portend): print("IP", octets,".",fourthoctet, end=" ") try: s.connect((server,portnum)) print("port",portnum,"is open") except: p ...
  • 这是我手动设置,运行此命令: pppd proxyarp mtu 1280 persist nodeflate noauth lcp-echo-interval 10 crtscts lock 10.10.1.2:10.10.1.1 /dev/ttyUSB0 115200 在一台主机上,以及在IP地址交换的另一台主机上使用相同的命令。 您现在应该在两台计算机上都有一个ppp0接口。 您需要在机器之间使用零调制解调器电缆 确保使用正确的/ dev / entry和串口速度 嵌入式系统倾向于将串行端口配置为内 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)