I want to go through the children of an element and filter only the ones that are text or span, something like:
element.children.select {|child|
child.class == String || child.element_type == 'span'
}
but I can't find a way to test which type a certain element is. How do I test that? I'd like to know that regardless if there's a bet...
Hi,
I use about a dozen different templates for several different vertical markets that I customize for CLients. I add custom Headers, footers and links and develop a color pallet and font used based on their preferences.
I would like to have a form that updates their own css files after the Client logs in and also offer a upload for th...
Do you know of an online CSS compressor that helps remove redudant/ineffecient CSS declarations and replaces it with more optimized CSS?
Meaning, I know that a lot of "compressors" exist that simply remove tabs, remove comments, etc.
But what I'm looking for is something smart enough to know that:
border-top: 1px solid red;
border-bo...
I have an html element that is contained within a div. Height are dictated by the outer div and the height and width of the input control are 100%. At the most basic level, I am having an issue where the textbox extends past the right of the containing div.
Basic example code:
<div style="height:25px; width: 150px;">
<input type=...
I'm interested in a parser that could take a malformed HTML page, and turn it into well formed HTML before performing some XPath queries on it. Do you know of any?
...
This function adds an overlay with the following properties to the entire browser screen,
$('a.cell').click(function() {
$('<div id = "overlay" />').appendTo('body').fadeIn("slow");
});
#overlay
{
background-color: black;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
display: none;
z-index: 100;
opacity: 0.5;
}
And...
<html>
<head>
<style type="text/css" rel="stylesheet">
* {margin:0;padding:0;}
div#box {background-color:green;width:1000px;}
/* #box {position:absolute;top:0;right:0;} */
/* #box {position:absolute;top:0;left:0;} */
/* #box {float:right;} */
#box {float:left;}
.clearer {clear:both;}
</style>
</head>
<body>...
I'm using the pre tag to display preformatted text (including line breaks, spaces and tabs etc.) But large lines without line-breaks are shown in one line and a scroll bar is added.
I want to limit the width of the pre tag (such that large lines are broken up to come to new lines and no scroll is required. Is this possible or is there ...
I need this XML,
<list columns="3">
<item>martin</item>
<item>donald</item>
<item>whistler</item>
<item>mother</item>
<item>carl</item>
<item>liz</item>
<item>cosmo</item>
</list>
to look like this:
<table>
<tr>
<td>martin</td>
<td>donald</td>
<td>whistler</td>
</tr>
<tr>
<td>mother</td>
<td>ca...
I have a site whose menu is functioning incorrectly in IE6, and only IE6.
A live preview of the site can be seen here.
The HTML & CSS are too long to post here but please view the source and the CSS.
I have implemented conditional comments and the IE6 Update jQuery plugin. Neither work.
...
Hi friends,
I need to know how to get full path from fileupload using javascript,
I tried using the following coding but of no use
<input type="file" id="picField" onchange="preview(this)">
<script type="text/javascript">
function preview(test){
var source=test.value;
alert(source);
}
</script>
but in the alert message, i ...
Hi friend,
I need to make new own file upload field using HTML and Javascript since Built-In file upload not showing full path of the file
I need to make it similar to file upload by using button and textbox
please help to solve this problem
...
So, I've been having this rather frustrating problem, and having failed so many times, I'm hoping someone here can help me. What happens is these tables on the left side of the page appear fine and do what they're supposed to do when I compile. However, once I load it on my company's intranet and load data that way (same data btw), the t...
My current solution will suck sometimes
EDIT
For those who don't understand,see this example:
<a title="<?php echo 'test';?>" >...
...
How can I move an image from left to right with jQuery?
...
I want to link to a section of a page using a bookmark site.com/Page.htm#Bookmark)
When the page is rendered, I'd like to highlight everything within the #Bookmark (Anchor)
E.g.,
Employee 1 , blah blah <---this text would be highlighted.
Naturally there are a dozen or so different bookmarks.
I was thinking maybe I co...
<input type="image" src="images/join.gif" name="SubmitStudent" onClick="CheckCaptcha();CheckTermsAcceptance(document.getElementById('chkStudent'));" width="98" height="31"/>
In the above code, if either the function CheckCaptcha or CheckTermsAcceptance returns False, than Form should not be submitted. How to check this?
...
Hi,
Not sure that the title is really describing what I am trying to do. Actually, this is quite simple and widespread usage over the internet :
I want in the background some liquid/full width of stripes (with the same height of some div of the design) while my content is using a Blueprint fixed-grid.
For instance, this website : int...
I didn't find the document about this.
...
Hi ,
Basically I will tell you what I want to do.
1: If a user is not logged in I want them to be re-directed back to the login page.
2: If a user is Logged in and they submitted a form I want them to be directed to the next page.
I have tried it with meta refresh but I can only seem to get it working with one or the other.
Can y...