jQuery and scrollTop, how can this work for IE/Chrome/Safari and Firefox ?

2010-05-12 / Javascript / No Comment

Today I have to make a scrollTop for a webpage, and I use jQuery for the most part of the javascript in the website.

So, the problem is, I do $(‘body’).scrollTop(0); and this work for Safari/Chrome, but only for it. So, I looking for a solution in the Internet, and it’s a pain to find one for all. But finally I found one, やった (yatta)!

What is it ? Simply $(« html,body »).animate({scrollTop: 0},0); and it’s work.

Tags: ,
Read More

Photos prises sur le toit d’un immeuble

2010-05-10 / Non classé / 2 Comments
Read More

CSS a nice popup with a border radius and opacity

2010-05-03 / Non classé / No Comment

Today I try to do a simple and nice popup in CSS without image.

So what I really want to do ?

Simple no ? Unfortunatly not.

One, you need to do the border opacity. For that one thing : If you have an opacity in one element, all its child have the same opacity (an opacity of 1 in the child is the opacity of the parent, an opacity of 0.5 in the child is 0.5*opacity of the parents).

So, I do that with 2 div in the same parents :

<div id= »parents »>
<div id= »child_border »>
</div>
<div id= »child_content »>
</div>
</div>

After that, I fix the opacity of child_border at 0.5 and I put it in center of the screen and x pixel from top. For the child_content I add 10px margin, so in reality I add the same margin-left than child_border plus 10px and I remove 20px from the width. And for the top, just add 10px to top.

So with thatm you have the basse. You have just to add the border radius : for webkit : -webkit-border-radius:10px; For Firefox : -moz-border-radius:10px; And for IE … Nothing for the moment. But you can add the standard border-radius:10px;

For IE opacity is not the same than webkit based browser (Safari/Chrome for example) or Gecko based (Firefox for example), it’s filter:alpha(opacity=50) for an opacity of 0.5.

Read More

AkihabaraNews, a new website released

2010-01-14 / Tibanne / 4 Comments

The January 4th, the new website of Akihabara News was online !

It took a really long time until we finally reached release, and I must say we can be proud of the result.

Read More

Border Radius in CSS3, how not to do simple ?

2010-01-14 / CSS / No Comment

When you want a border-radius in your box, you have to choice : use CSS3, because it’s the standard or not.

The CSS3 is cute, nice, other stuff, but, Firefox and Safari (and IE) don’t implement it for border-radius …

How can I do ? In Safari, it’s easy, just to add -webkit- (ex : -webkit-border-radius). For Firefox, it’s -moz-border-radius too. But if you want use border-top-right-radius, or other specific choice, in Firefox, it’s -moz-border-radius-top(no space, no -)right.

Safari it’s juste -webkit-border-top-right-radius.

Simple no ?

(But only Safari support an another propriety : -webkit-box-shadow, with that, you can add a shadow to your box, and it’s very cool)

Tags: , , , ,
Read More

My first snowstorm in Québec !

2009-12-09 / Non classé / No Comment

Hi, today, in this afternoon, I can see my first snowstorm ! (Ok, my second, the first is when I come in Quebec)

When I remember my grandfather and his ‘No snow if the temperature is not 0¬∞C’ … For the moment, I can see -7¬∞C, and a lot of snow fail from the sky. Why ? I don’t know.

In 21 days, I go to Japan, and, I think, I’ll never see other snowstorm in Japan. But I’ll see a lot of japanese schoolgirls ! The dream !

Tags:
Read More

Little multi-image display script in Javascript

2009-10-03 / Non classé / No Comment

This is a little script made in CSS and JavaScript.

It’s a little multi-image display script with the ability to display 4 images and two lines of related text per image. You can do anything with this code, as long as you comply with GPL v2.

To test : http://precea.jp/prepre/carrousel

To download it : http://precea.jp/prepre/carrousel/carrousel.zip

Read More

La France, sont gouvernement et le Net …

2009-09-16 / Non classé / No Comment

Aujourd’hui, je reçois un étrange mail sur la mailing d’OVH. Voici le message :

Bonjour,
C’est triste de constater que le monde politique français n’utilise pas systématiquement de noms de domaine en .fr et ne s’héberge pas en France.
La peur de la loi LCEN ? Le boycott de la loi HADOPI/HADOPI 2 ? Et pourtant il y a plein de bons hébergeurs en France qui font parfaitement bien leur boulot. Et pourquoi un .com ??? Le .fr n’est pas assez français ? Non, je ne comprends pas. Ce sont les évidences, ça saute aux yeux, et pourtant … bon … il ne reste plus qu’à avoir désir de faire mieux la prochaine fois … mais faites passer le mot que le Net en France ça existe et ça marche pas trop mal …

Amicalement
Octave

Avant cela j’avais vu l’excellant site suivant http://www.desirsdavenir.org/

Et ça tombe bien, il y a une réponse assez bonne :

c’est pas la période en ce moment pour du made-in-france…

la nouvelle de la semaine : http://www.desirsdavenir.org/, mort-né après sa refonte, et qui a déjà était parodié des centaines de fois (ex : http://www.meme-desirsdavenir.com/ ).

c’est français malheureusement, hébergé chez 1et1, et ça a couté 41k € pour une page d’accueil à chier et un joomla mal intégré… :-(

Comme quoi, le Net en France ….

Read More

Hadopi, petite vidéo du jour

2009-09-08 / Hadopi / 1 Comment

Bon, mon colocataire québécois ma donné aujourd’hui un lien vers une vidéo assez intéressante sur Hadopi.

Bon, je préviens à l’avance, c’est une caricature mais elle est bien faite.

La vidéo ? La voici : Vidéo sur Youtube

Bon, et une deuxième faite par la Quadrature du net : Sur Youtube encore

Tags:
Read More