preload
Jan 10

Ever had problems in IE7 with z-index css attribute?

Problem:
The Menu created with superfish plugin for jquery will be shown behind the main content on mouseover.

Solution:
With Jquery dynamically reverse the CSS zindex stacking order of the page element so that higher elements in HTML source have highter z-index number

1
2
3
4
5
6
7
       	$(function() {
		var zIndexNumber = 1000;
		$('div').each(function() {
			$(this).css('zIndex', zIndexNumber);
			zIndexNumber -= 10;
		});
	});

Check this link for more information: http://www.vancelucas.com/blog/fixing-ie7-z-index-issues-with-jquery/

Tagged with:
Jun 04

Situation:
Imagine your customer has a bunch of Excel-files which he wanted to display on a website in html-form.

Problem:
What can you do here? You can write an importer to a database, or let the customer upload the excel file on a webserver and write a parser for the excel files etc. These are all non-trivial solutions for the problem that you want to easily display your information from the csv on a webpage into a table.

Solution:
I found a plugin called jquery csv2table. This is very simple to use. A CSV-file will be read asynchrounosly and a HTML-table will be created of it. So you can simply let your customer load his csv file up and the table will be created automatically. Optional support of sorting, highlighting etc. Link: http://plugins.jquery.com/project/csv2table

Example:

?View Code JAVASCRIPT
1
2
3
4
5
6
<div id="view1"></div>
<script type="text/javascript">
$(function(){
    $('#view1').csv2table('./data/Book12.csv');
});
</script>

This code will load the data from Book12.csv into the div “view1″.

Tagged with: