桌面浏览器上的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
最满意答案
上面的代码不起作用,因为直到测试只验证结果是否为空。
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 yourdo { }
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 ...
-
直到IP:端口正在响应(loop until IP:port is responding)[2023-05-01]
上面的代码不起作用,因为直到测试只验证结果是否为空。 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__() ...
-
仅限cURL IP和端口(cURL only IP and port)[2023-08-29]
服务器不会说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 ... -
JS验证IP:端口(JS Validation IP:Port)[2022-09-03]
为了验证数字是否在可接受的范围内,正则表达式必须非常可笑。 相反,我会用这个: 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 ...
-
串行端口上的TCP / IP(TCP/IP over Serial Port)[2022-08-27]
这是我手动设置,运行此命令: 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和串口速度 嵌入式系统倾向于将串行端口配置为内 ...