Questions tagged [tritium]

A transformation language for XML-friendly files.

Tritium is a simple transformation language used for data manipulations. Tritium fundamentally changes the way sites are delivered to multiple devices by focusing development effort on front-end programming that creates amazing experiences. The result is super fast programming and rapid iteration on critical mobile projects. Most developers and designers familiar with CSS or JQuery learn Tritium in a few hours. Developers use their choice of editor to write Tritium code and use a Rails-like development flow using the management console.

Source: http://www.moovweb.com/developers/moovwebsdk

62 questions
3
votes
2 answers

Using tritium to move html elements

I'm using the Moovweb SDK to make a mobile version of a website and I need to move an image from one div to another. How can I do this using tritium?
...
Alex De Simone
  • 572
  • 1
  • 4
  • 8
3
votes
1 answer

WebSocket connections and Tritium

Can a site use Tritium while also establishing open socket connections with whatever host you are 'filtering' requests from? Let's say I wanted to clone a site which is using WebSockets to keep open connections for a browser chat client. Would…
C N
  • 41
  • 3
3
votes
1 answer

Maintaining staging/development/production on Moovweb?

I would like some guidance when working projects with Moovweb. I'd like to understand what are some of the best practices at managing my Moovweb projects on Github. Specifically how to move them and maintain them from development to staging to…
juanca
  • 353
  • 1
  • 9
3
votes
2 answers

How do I use length() for unicode characters?

When working in the Moovweb SDK, length("çãêá") is expected to return 4, but instead returns 8. How can I ensure that the length function works correctly when using Unicode characters?
Currin Berdine
  • 287
  • 1
  • 10
2
votes
0 answers

Solving CORS issues in Moovweb

I facing one issue while working on moovweb tritium project. The site I'm proxing is using external domain (CORS) to perform some operation. Due to this, "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at…
Kam Paul
  • 111
  • 1
  • 6
2
votes
1 answer

Injecting newline after specific word in text with tritium

I have a span node that needs a newline inserted after a certain word. Whenever I use tritium to get into the inner() or text() scope I can't figure out how to inject a break in a way that the browser will interpret as a new node and not text. I…
1_2_3_Reapeater
  • 266
  • 1
  • 10
2
votes
1 answer

How do I change inline javascript with Tritium?

I'm transforming a website using tritium, and there's a chunk of inline javascript that interferes with how the mobile site should work. There's really only one line that I want to take out, however, so I can't really just remove the whole chunk.…
2
votes
1 answer

split

I have a long ul where the number of li's are not constant
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
and I want to split this into two ul's using Moovweb…
Cagri
  • 68
  • 4
2
votes
2 answers

How do I mutate a tritium variable string?

I've fetched the entire list of classes from the body into a variable like so: $page_code = fetch("self::body/@class") But I only want to grab one class out. I tried using replace() and a regex on the variable contents but I think something's up…
1_2_3_Reapeater
  • 266
  • 1
  • 10
2
votes
3 answers

Working with iframes with the moovweb sdk

I've created a project with the moovweb sdk and have trouble editing the content within an iframe on one of the pages. For instance, moving a div around inside the iframe doesn't seem to work with the tritium I'm writing. What can I do with tritium…
Alex De Simone
  • 572
  • 1
  • 4
  • 8
2
votes
1 answer

Can I use CSS selectors in Tritium for moving/copying elements?

I am trying to copy an element to a given CSS selector in Tritium. The Tritum Spec lists the signature for copy_to as: copy_to(Text %xpath) http://tritium.io/simple-mobile/1.0.224#Node.copy_to(Text%20%25xpath) I am trying to do: copy_to( …
2
votes
1 answer

In Tritium, how can I select the previous/next element?

I'm using the Moovweb SDK to transform a website, and I have a lot of pages with content that matches this format. There is an

that begins a section, and that section has a random number of

elements. Since these elements have no…

juanca
  • 353
  • 1
  • 9
2
votes
1 answer

In Tritium, how do I select an element if I only know its relationship with another element?

I'm using the Moovweb SDK to transform my blog site, and I have a list of comments as such:
2
votes
2 answers

In Tritium, how do I add an attribute with no value assigned to it?

I have a normal tag: ... I need it to look like this: ... Why? jQuery Mobile feature: http://jquerymobile.com/demos/1.1.1/docs/pages/page-cache.html The…
gregorygtseng
  • 851
  • 4
  • 12
2
votes
1 answer

In Tritium, how do I remove text from a node?

I have some HTML content structured like this:
random text I want to remove Important Text #1 more text I want to remove Important Text #2
How do I remove the text in this div while keeping the…
gregorygtseng
  • 851
  • 4
  • 12