This forum is for assistance with theme development.

custom JS and drupal 7 theme upgrade

Hi

i'm upgrading my D6 theme to D7 and i use a custom JS code to do dynamic anchor.in D6 i put my code in a JS file include in the theme via the .info file.And paste html code into tpl file.
I do the same in D7 but doesn't work..can you tell me why please ? thanks

//Pour avoir un retour haut dynamique selon longueur du contenu
/*
*Utiliser dans le html cette ancre:
*
*

Haut de page
*
**/
Drupal.behaviors.goTop = function(context) {
var link = $('#retour_haut', context);

$(window).scroll(function(){
if ($(window).scrollTop() >= 250) { // Si la page est descendue de 250px.
link.fadeIn(500); // On fait un fadeIn pendant 500ms.
} else {
link.fadeOut(500); // On est au dessus de 250 donc fadeOut pendant 500ms.
}
});

link.click(function(e) {
e.preventDefault; // Lors d'un click on empêche le navigateur de rafraichir
//$.scrollTo(400); // Et on va en haut de page.
$('html,body').animate({scrollTop:0},'slow');
});
}
//Pour avoir un scroll smooth. http://www.learningjquery.com/2007/08/animated-scrolling-for-same-page-links
$(document).ready(function() {
$('a[href*=#]').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')

Omega: How to name a "region--content" template for a particular node?

I've got a single node that I'd like to have a custom region--content template for. But, I can't figure out the theme hook. I've tried this:

region--content-node--44.tpl.php
region--content--node-44.tpl.php
region--content_node-44.tpl.php
region--content--node_44.tpl.php

None seem to work. Can anyone lend an assist?

style radio buttons on form

Hi,

I searched on this topic, found some results but it's still not working with me.

This is the code I use to style some radios:

“Active” class not being applied to Block menu li (solved)?

Update: solved using http://drupal.org/project/menu_block to create the block menu instead of using the default Main Menu block.

I'm doing some theming (Omega sub-theme) and I've discovered that when you call the main menu in a block the "active" class only gets applied to the li a and not the li, but the menu that's already displayed by default does have this class applied to the li. Does anyone know why that is and how I can apply the active class to the li in a Block menu so I can style the active li? Thanks.

Image busts out of its box in a View

I'm using Display Suite to manage my images on a new content type. I had to hardcode into the system the following CSS in order to keep the image inside the box on the full nodes:

how do yo make website content not a blog with a comment box?

how can i make certain pages look like just pages with out the blog style with comment box and all that add article stuff

i just want some simple pages like home, about, contact, etc

blog is still ok just that i want to use it in a blog only area so on the menu it can say something like home, about , contact, blog(or maybe updates, new content, features or whatever but still blog style)

i still want to be able to update the home page and the other pages to edit them ... is this possible?

Pages

Subscribe with RSS Subscribe to RSS - Theme development