Hi all,
So, I'm working on a Wordpress site and have two issues on my homepage:
1) I've used jquery to load an image where I should have a link...this is the jquery I used:
and then for that same menu link, I tried to load in the CSS:Code:<script>$(document).ready(function(){ $('a:contains("Home")').css({background:'url(http://50.116.87.55/~open2biz/wp-content/themes/open2business/images/home.png) no-repeat top left'}); });</script>
When the CSS loads, the home link is getting the background image but the other CSS is not working...is there anyway to use jquery to set multiple css styles, except just the one OR can I load a class name dynamically to apply that css to?Code:<class for home menu item here> { display:block; font:size:0; height:40px; width:40px;}
__________________________________
ALSO:
I have a multi-column layout that is a little bit off...this is the CSS and DOM that it's using:
DOM for outputting the content on that page:Code:div#left-column { width: 310px; float: left; clear: none; padding-right:20px; } div#right-column { width: 310px; float: right; clear: none; padding-left:20px; }
The columns aren't aligning properly...Code:<div id="content"> <?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) == 0) : $wp_query->next_post(); else : the_post(); ?> <div id="left-column"> <div id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>><h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1> <span class="date_m"><?php the_time('M');?></span> <span class="date_d"><?php the_time('d');?></span></div> <?php the_excerpt(); ?> </div> <?php endif; endwhile; else: ?> <div>Alternate content</div> <?php endif; ?> <?php $i = 0; rewind_posts(); ?> <?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) !== 0) : $wp_query->next_post(); else : the_post(); ?> <div id="right-column"> <div id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>><h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1><br /> <span class="date_m"><?php the_time('M');?></span> <span class="date_d"><?php the_time('d');?></span></div> <?php the_excerpt(); ?> </div> <?php endif; endwhile; else: ?> <div>Alternate content</div> <?php endif; ?> <br /><br />
This is the homepage, where my issues can be viewed...
http://50.116.87.55/~open2biz/
Can anyone help with this?![]()


Reply With Quote


Bookmarks