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
1
vote
1 answer

What are all the Tritium environment variables?

Where can I find a full list of the Tritium variables (such as $host, $path, $content_type, etc.)?
gregorygtseng
  • 851
  • 4
  • 12
1
vote
1 answer

In Tritium, how do I set a CSS class as a variable?

I'm using the Moovweb SDK, and writing Tritium to modify my HTML. How do I save a CSS class as a variable? I want to grab an existing class and apply it to other elements.
gregorygtseng
  • 851
  • 4
  • 12
1
vote
3 answers

How to move picture to another div in tririum

If I have something like this:
How do I move this image to another div in tritium?
1
vote
1 answer

Select a contiguous group of html elements with XPath

I'm using Moovweb SDK and I want to apply a Tritium function I wrote to each group of contiguous elements with a certain classname. Given a flat hierarchy of html elements, how should I go about selecting only the groups of elements that appear in…
wonj
  • 81
  • 4
0
votes
1 answer

Is there a way to access an elements parent in tritium?

for example, let's say there was this html:
Would there be a way to access the parent div from the child elements namespace such as: $$('#divchild'){ # Access parent div here $$('< div'){ # somethere…
Dirk Dunn
  • 363
  • 2
  • 3
  • 14
0
votes
2 answers

MoovWeb: Redirect desktop user to desktop site if they try to visit m.site.com

Using MoovWeb for a large eCommerce client. They want to block desktop users from visiting the mobile site. So basically, if a user is using a desktop browser and tries to visit (m.site.com) they will be redirected to (site.com). Must do this in…
chonax
  • 1
  • 3
0
votes
2 answers

Fetch content from other page in Moovweb

I am transforming a site using Moovweb. On one of the pages I want includes content from a seperate page/url. I just want to include partial content. Presently I have two options in mind: Achieve this using AJAX, but this requires new content to be…
Saurabh Sharma
  • 4,894
  • 2
  • 15
  • 14
0
votes
1 answer

How can I remove a piece of javascript text with tritium?

I have this piece of tritium text that I was to use in order to remove a piece of javascript code. # to remove an inline js code based on text search $("//script[contains(text(),'textiwanttoremove')]") { text(){ …
Dirk Dunn
  • 363
  • 2
  • 3
  • 14
0
votes
3 answers

In Tritium, How to insert any element between the children second and third anchor tag?

1 2 3 4
How to insert any element between the children second and third anchor tag?
0
votes
2 answers

In Tritium,how to select li which have the same class as other?

  • 1
  • 2
How to select li which have the same class as other?
Sakshi
  • 3
  • 1
0
votes
1 answer

In Tritium, can I select all children of a node?

I have a div that has several child divs. Some have ID's and classes, some do not. I have used move_children_to() and was wondering if there is something similar to select the children.
nikkyt
  • 13
  • 5
0
votes
1 answer

Merge Zurb Foundation Icon Fonts Into Moovweb

I am trying to include Zurb Icon Fonts 3 into my Moovweb project. First off, is it supported? Second, what do I have to do to get them to work. I have tried a few different combinations of importing them, but each time it brings up a blank local…
Danny Sullivan
  • 277
  • 2
  • 12
0
votes
1 answer

Convert ul with onclick() into select with onchange()

I have a ul containing a series of tabs with onclick() attributes, and I want to convert it into a select node with options instead of list items. Right now each tab has its own onclick() attribute, but it looks like a select node only has one…
1_2_3_Reapeater
  • 266
  • 1
  • 10
0
votes
1 answer

When in Tritium, how do I select a div containing more than one class?

I forget how to do this in the Moovweb SDK
Currin Berdine
  • 287
  • 1
  • 10
0
votes
1 answer

Why should I use sprites on my mobile site?

Why should I use sprites in building the CSS on my mobile site? And how do I implement them while in Tritium?
Currin Berdine
  • 287
  • 1
  • 10