sifr recognising < a > tags when they are the root element - sifr

It doesn't seem like sIFR renders the text as a link when the tag you are replacing IS the < a > link instead of containing the link. Have I missed something or can this be added to the new version?
Thanks
Dave

sIFR replaces the content of the elements you specify. Therefore, it replaces the text inside the <a>, not the link itself. You need to replace the parent element of the link, such that the link itself ends up inside the Flash movie.
If necessary you can wrap the link in a <span> and replace the <span>.

Related

UIWebView Paste action add font tag to my html

In my application I have a contentEditable UIWebView.
When I use copy: and then paste: functions, and examine the html generated, i see that the paste code is insterted in a "font tag" that change the appearence of the page.
For example: I copy an h1 tag with some text, when i paste it, and examine the html i see that this h1 tag is inserted in "font" tag that use "Times" and it is resized to "3".
I have examined the UIPasteboard but the code inside it is correct.
How can i solve my issue?
Please, it is very important.
Cheers
This is a bug in UIWebView. If your contenteditable element has no font-size style specified, the content is pasted correctly.

How to create an anchor within a div?

I'm looking for a solution that doesn't require JavaScript, jQuery or anything too advanced; mostly HTML/CSS as those are what I am restricted to using.
The idea I have is a layout with two smaller div classes within one div ID. Each box have their own content and are placed side by side. What I'm trying to accomplish is to create an anchor link within one div that changes its content to something else.
e.g. box 1 on default displays "abc" as its content while box 2 displays "def". When you click on an anchor link in box 1, the content would then change to 123-- without affecting what's in box 2 or moving it down with the anchor.
Hopefully that makes sense.
There's no code to edit/work off of so any help would be appreciated.
You can use the :target selector to hide both div, and show element with the ID in the URL hash:
div.MyBox {
display: none;
}
div.MyBox:target {
display: block;
}
Clicking an <a> tag pointing to #someId would then show that element.

Making a table row a link with specific CSS class

I'm currently using a script for a popup window, where when you hit the link, a nice graphic popup window will appear. My problem is, that in it's current form it's a text link, which are working fine. But I want the entire row, that being the row the link is in, to be pushable, and open the popup window, instead of just the link.
Some will say I should use an onlick command of some sort, but my problem is, that my current link is defined as:
Link
And I have no idea how to add the rel and class to an onclick command for the row fx.
So is there some smart way to do this?
you can use this trick to make a whole cell a link
simply, add the text you want to link it in a <div> and set both width and height 100%
HTML:
<td><div>link</div></td>
CSS:
td>a>div {width:100%; height:100%}
you can see an example at JSfiddle (the second row):
http://jsfiddle.net/w8W4L/

Wrap text in list items/buttons instead of hiding the overflow

I'm trying to override the default behavior of list items and buttons in jQuery Mobile, which has text which doesn't fit on one line as hidden overflow.
If you view this on a skinny browser window or iPhone you'll see what I mean: http://m.gizmag.com
I'd like to be able to wrap the text in the h3 and p tags of each list item onto new lines.
Thanks in advance!
Try setting a style of white-space:normal for the elements.
I just did this with an anchor (<a>) element inside a jQuery Mobile listview-styled li, and it worked to wrap the text as I expected. I used Chrome's developer tools to determine where the CSS attributes were coming from and interactively changed them to make it work the way I wanted.
--
Derek
If feasible, enclosing it inside a <div> will also make it wrap. (But finding the affected element and declaring white-space:normal is the more proper solution)
Source: http://forum.jquery.com/topic/list-items-are-truncating-text-is-there-a-way-around-this

sIFR 3+li menu

I'm trying to make a li-menu that use sIFR. What I wanna do is to make sIFR replace the first level of the menu but not the second level. The menu is only in two levels.
You can find the menu at: www.norrlandsoperan.se/default.asp?id=10135
I would really appreciate if you could make me a hint on how to make this work.
Many thanks.
Regards / Erik Wennberg
If the sub menu is contained within the parent <li>, you need to wrap the text in the parent <li> in a <span> element. Then use a selector like ul#menu > li > span to replace just those elements.
Specify a selector like ul#menu > li to only get the first level of <li>s. I think that should work with sIFRs own selector engine, otherwise use jQuery (you can find in the sIFR documentation how to change it.)

Resources