tritium

How do I add a query parameter to a URL?

一个人想着一个人 提交于 2019-12-22 11:23:16
问题 What's the best practice for adding a query parameter to a URL in Tritium (Moovweb SDK)? Looking for something that works where you don't know if the URL has a "?" and other query parameters already. 回答1: Here's a short snippet of Tritium that should help you out in your Moovweb project. Just replace the "query_param=true" bit with the query parameter you want to add. It selects the href of every a tag, then looks for any existing query parameters (by looking for a "?" in the href). If there

How do I add a query parameter to a URL?

大城市里の小女人 提交于 2019-12-22 11:20:05
问题 What's the best practice for adding a query parameter to a URL in Tritium (Moovweb SDK)? Looking for something that works where you don't know if the URL has a "?" and other query parameters already. 回答1: Here's a short snippet of Tritium that should help you out in your Moovweb project. Just replace the "query_param=true" bit with the query parameter you want to add. It selects the href of every a tag, then looks for any existing query parameters (by looking for a "?" in the href). If there

Why should I use sprites on my mobile site?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 03:51:35
问题 Why should I use sprites in building the CSS on my mobile site? And how do I implement them while in Tritium? 回答1: The Why Put simply: to save on network requests. One request for a sprite at 10kB is much faster over a network than ten requests for ten 1kB images. Additionally, that one compressed image sprite is going to yield huge savings over the network. For example, take 13 images, each around 4kB. That's 52kB over 13 network requests. With spriting, it can be brought down to 1 image at