SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Slider tabs and links

    I've been working on my slider content and although it was fine when I left it upon my return none of the tabs jump up or link to the slides anymore

    Can anyone see what's happened, is it a jscript problem?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Things don't just stop working. It can appear like that if you make a change but don't fully refresh the browser—and then come back later when the browser has been cleared. What recent changed did you make?

  3. #3
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I had been updating the content for the scrollers "1" "2""3" and "4"

    And I placed the images in the left hand side of them too
    and I added the cta2 cta3 and cta4 on the scrollers.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    It's quite possible that one of these errors is tripping up the JS on the page:

    http://validator.w3.org/check?uri=ww...Inline&group=0

  5. #5
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    yea, this is what is strange as I have checked these errors. The lines and errors where it says I am missing end tags etc they are fine in the code and I don't understand the short tag thingy. I did search it and I changed the doctytpe to html transitional 4.01 but that didn't make any difference to the shorttag error

  6. #6
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    ahhhhhhhhhhh wait I see
    I've been checking for the wrong thing
    lemme get back in a few mins after I check it

  7. #7
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by hantaah View Post
    The lines and errors where it says I am missing end tags etc they are fine in the code ...
    Not really. Even if you look at the first error, it's alerting you to this:

    Code:
    <div id="home-left"><img class="icon" src="http://organicwebdesigns.co.uk/wp-content/themes/eBusiness/images/wp_icon_s1.png" alt="wordpress icon" />WordPress helps you manage your site easily &amp; it’s free. It’ll help your search engine rankings &amp; it’s full of plug ins. I’ll show you how it all works as we go, so you can have full control.</p>
    Look at your generated source code first (I like Chrome, because it has line numbers). Then perhaps work backwards through your WP templates to work out where the errors are.

  8. #8
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    yea just checking that one now but the problem I'm getting is that the text editor keeps omiting my <p> and <br/> tags, so going into the text editor there is not </p> for me to even delete so I have deleted the whole page. Deleting that whole page gets rid of that error but the sliders are still not working

    gosssh

  9. #9
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Yes, deleting a whole page often does get rid of an error ... kind of like dying gets rid of cancer.

    Those errors may not b the problem, but worth fixing anyhow. The browser is indicating a JS error, but I'm afraid I can't interpret it.

  10. #10
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    oh gosh! Well I jusr re added the page, hand wrote the code and made sure there are no <p> tags opened or closed, revalidateed and that error is there again even though I did not put any <p> tags there. When you say you cannot interpret it what do you mean? Do I need to edit something in the js file?

  11. #11
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by hantaah View Post
    Do I need to edit something in the js file?
    That's the problem—I don't know. The error reads:

    Code:
    Uncaught Error: Syntax error, unrecognized expression: .slider-link-1, .slider-link-2, .slider-link-3, .slider-link-4, .slider-link-5,
    I don't know what it's trying to tell me, though.

  12. #12
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I am confused maybe I will have to start again from scratch

  13. #13
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    grrr really don't want to start again, I'll try and post again in the js forum
    Thanks again

  14. #14
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thought I'd post the solution for benefit of anyone and appreciation of help. It was the last comma causing the syntax error here in the custom.js file

    A(".slider-link-1, .slider-link-2, .slider-link-3, .slider-link-4,").hover(function(){

    Remove the final comma after .slider-link-4 and you'll be good to go.

  15. #15
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by smnkrblt View Post
    Thank you
    yea, I see from the source code what the problem is however the code diplayed in the source code is not the code I'm getting in my files. The this error for example:

    <div id="home-left"><img class="icon" src="http://organicwebdesigns.co.uk/wp-content/themes/eBusiness/images/wp_icon_s1.png" alt="wordpress icon" />WordPress helps you manage your site easily & it’s free. It’ll help your search engine rankings & it’s full of plug ins. I’ll show you how it all works as we go, so you can have full control.</p>

    we can see it has a closing </p> with no opening <p> and so the source code shows the same. I'd like to either go and delete that </p> or add the missing <p> so I go into my wordpress dashboard>pages>wordpress&management>html but none of the <p> or </p>'s are there, they have been omited automatically somehow. So then I go to the editor and default.php where the code for the home page is and I get php code so I'm baffles as to where the html needed is placed or hidden. Here is the php code for default.php:

    <?php $ebusiness_home_page_1 = str_replace('&amp;','&',get_option('ebusiness_home_page_1'));
    $ebusiness_home_page_2 = str_replace('&amp;','&',get_option('ebusiness_home_page_2'));
    $ebusiness_home_page_3 = str_replace('&amp;','&',get_option('ebusiness_home_page_3'));
    $ebusiness_home_page_4 = str_replace('&amp;','&',get_option('ebusiness_home_page_4'));
    ?>
    <?php get_header(); ?>
    <?php get_template_part('includes/scroller-' . esc_attr( get_option('ebusiness_scroller_number') ) ); ?>

    <div id="home-container">
    <div id="home-wrap">
    <?php if (get_option('ebusiness_home_blog') == 'on') : ?>
    <div id="home-left">
    <?php query_posts('page_id=' . get_pageId(get_option('ebusiness_home_page_1')) ); while (have_posts()) : the_post(); ?>
    <div class="post-info-wrap-home"> <img src="<?php bloginfo('template_directory'); ?>/images/home-title-1-left-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" />
    <h2 class="home-title-1">
    <?php the_title(); ?>
    </h2>
    <img src="<?php bloginfo('template_directory'); ?>/images/home-title-1-right-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" /> </div>
    <div style="clear: both;"></div>
    <?php global $more;
    $more = 0;
    the_content(); ?>
    <?php endwhile; wp_reset_query(); ?>
    </div>
    <div id="home-right"> <img src="<?php bloginfo('template_directory'); ?>/images/recent-top-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" />
    <div class="recent">
    <div style="position: relative;">
    <div class="prev2"></div>
    <div class="next2"></div>
    </div>
    <span class="blog-title"><?php esc_html_e('From the Blog','eBusiness') ?></span> <a href="<?php echo esc_attr(get_option('ebusiness_rss')); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/rss.gif" alt="home title" class="rss-button" /></a>

    <div class="recent-scroll">
    <ul>
    <?php while (have_posts()) : the_post(); ?>

    <?php $width = 35;
    $height = 35;
    $classtext = 'recent-thumb';
    $titletext = get_the_title();

    $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
    $thumb = $thumbnail["thumb"]; ?>
    <li>
    <?php if($thumb != '') { ?>
    <a href="<?php the_permalink() ?>" title="<?php printf(esc_attr__('Permanent Link to %s','eBusiness'), get_the_title()) ?>">
    <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
    </a>
    <?php } ?>

    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__('Permanent Link to %s','eBusiness'), get_the_title()) ?>" class="recent-link">
    <?php truncate_title(42) ?>
    </a>
    <div class="recent-info">
    <?php the_time(get_option('ebusiness_date_format')) ?>
    |
    <?php comments_popup_link(esc_html__('No Comments','eBusiness'), esc_html__('1 Comment','eBusiness'), esc_html__('% Comments','eBusiness')); ?>
    </div>
    </li>
    <?php endwhile; ?>
    </ul>
    </div>

    </div>
    <img src="<?php bloginfo('template_directory'); ?>/images/recent-bottom-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" /> </div>
    <?php else : ?>
    <?php query_posts('page_id=' . get_pageId(get_option('ebusiness_home_page_1')) ); while (have_posts()) : the_post(); ?>
    <div class="post-info-wrap-home"> <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-left-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" />
    <h2 class="home-title-1">
    <?php the_title(); ?>
    </h2>
    <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-right-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" /> </div>
    <div style="clear: both;"></div>
    <?php global $more;
    $more = 0;
    the_content(); ?>
    <?php endwhile; wp_reset_query(); ?>
    <?php endif; ?>
    <img src="<?php bloginfo('template_directory'); ?>/images/line-bg-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-line" />
    <div style="clear: both;"></div>

    <?php if (get_option('ebusiness_home_page_number') != '1') : ?>
    <?php query_posts('page_id=' . get_pageId(get_option('ebusiness_home_page_2')) ); while (have_posts()) : the_post(); ?>
    <div class="post-info-wrap-home"> <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-left-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" />
    <h2 class="home-title-1">
    <?php the_title(); ?>
    </h2>
    <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-right-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" /> </div>
    <div style="clear: both;"></div>
    <?php global $more;
    $more = 0;
    the_content(); ?>
    <?php endwhile; wp_reset_query(); ?>
    <?php endif; ?>

    <?php if (get_option('ebusiness_home_page_number') == '3') : ?>
    <?php query_posts('page_id=' . get_pageId(get_option('ebusiness_home_page_3')) ); while (have_posts()) : the_post(); ?>
    <img src="<?php bloginfo('template_directory'); ?>/images/line-bg-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-line" />
    <div style="clear: both;"></div>
    <div class="post-info-wrap-home"> <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-left-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" />
    <h2 class="home-title-1">
    <?php the_title(); ?>
    </h2>
    <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-right-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" /> </div>
    <div style="clear: both;"></div>
    <?php global $more;
    $more = 0;
    the_content(); ?>
    <?php endwhile; wp_reset_query(); ?>
    <?php else : ?>
    <?php endif; ?>
    <?php if (get_option('ebusiness_home_page_number') == '4') : ?>
    <?php query_posts('page_id=' . get_pageId(get_option('ebusiness_home_page_3')) ); while (have_posts()) : the_post(); ?>
    <img src="<?php bloginfo('template_directory'); ?>/images/line-bg-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-line" />
    <div style="clear: both;"></div>
    <div class="post-info-wrap-home"> <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-left-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" />
    <h2 class="home-title-1">
    <?php the_title(); ?>
    </h2>
    <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-right-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" /> </div>
    <div style="clear: both;"></div>
    <?php global $more;
    $more = 0;
    the_content(); ?>
    <?php endwhile; wp_reset_query(); ?>
    <?php query_posts('page_id=' . get_pageId(get_option('ebusiness_home_page_4')) ); while (have_posts()) : the_post(); ?>
    <img src="<?php bloginfo('template_directory'); ?>/images/line-bg-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-line" />
    <div style="clear: both;"></div>
    <div class="post-info-wrap-home"> <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-left-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" />
    <h2 class="home-title-1">
    <?php the_title(); ?>
    </h2>
    <img src="<?php bloginfo('template_directory'); ?>/images/home-title-2-right-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="home title" class="home-title-image" /> </div>
    <div style="clear: both;"></div>
    <?php global $more;
    $more = 0;
    the_content(); ?>
    <?php endwhile; wp_reset_query(); ?>
    <?php else : ?>
    <?php endif; ?>
    </div>
    <div style="clear: both;"></div>
    <img src="<?php bloginfo('template_directory'); ?>/images/content-bg-<?php echo esc_attr( get_option('ebusiness_color_scheme') ); ?>.gif" alt="line" style="margin-top: 15px;" class="iehack" /> </div>
    <?php get_footer(); ?>
    </body></html>

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    here is the code with the missing / omited html

    <div id="home-left"><img class="icon" alt="wordpress icon" src="http://organicwebdesigns.co.uk/wp-content/themes/eBusiness/images/wp_icon_s1.png" />Wordpress helps you manage your site easily &amp; it's free. It'll help your search engine rankings &amp; it's full of plug ins. I'll show you how it all works as we go, so you can have full control.
    <div style="clear: both;"></div>
    <img class="icon" alt="eshop icon" src="http://organicwebdesigns.co.uk/wp-content/themes/eBusiness/images/ecom.jpg" />Sell your stuff online without paying a premium or monthly fee. Add and update products with ease. Receive payments via Credit card, Authorize.net, Google checkout, Paypal and more.
    <div style="clear: both;"></div>
    <img class="icon" alt="rss icon" src="http://organicwebdesigns.co.uk/wp-content/themes/eBusiness/images/rss_s1.gif" />RSS feeds are a great way to connect with your customers and update them with new news and features on your site. It can really bring in the money.

    </div>
    <div id="home-right">
    <h3>5 REASONS TO HIRE ME NOW</h3>
    <ul>
    <li id="numbers1">I don't just design, I grow your business online &amp; ensure your success targets</li>
    <li id="numbers2">I have passion for my projects so choose to dedicate all my time &amp; effort into yours</li>
    <li id="numbers3">I'll take all the pressure off you or coach &amp; support you through it</li>
    <li id="numbers4">I believe that excellent customer service &amp; support is part of the package</li>
    <li id="numbers5">As an elite member of the PWDA I have access to the best resources in the world</li>
    </ul>
    </div>

  16. #16
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Go though and check that any open div is closed again. Perhaps add in comments after each closing div to clarify which div it closes.

  17. #17
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Go though and check that any open div is closed again. Perhaps add in comments after each closing div to clarify which div it closes.
    Good point about the comments! <!-- And I must start practicing that from now -->

    So I did that and divs are opened and closed ok ( at least in the text editor, any other code I don't seem to have access to except the default.php )
    here is my code with the comments:

    <div id="home-left">
    <img class="icon" alt="wordpress icon" src="http://organicwebdesigns.co.uk/wp-content/themes/eBusiness/images/wp_icon_s1.png" />Wordpress helps you manage your site easily &amp; it's free. It'll help your search engine rankings &amp; it's full of plug ins. I'll show you how it all works as we go, so you can have full control.
    <div style="clear: both;"></div>
    <img class="icon" alt="eshop icon" src="http://organicwebdesigns.co.uk/wp-content/themes/eBusiness/images/ecom.jpg" />Sell your stuff online without paying a premium or monthly fee. Add and update products with ease. Receive payments via Credit card, Authorize.net, Google checkout, Paypal and more.
    <div style="clear: both;"></div>
    <img class="icon" alt="rss icon" src="http://organicwebdesigns.co.uk/wp-content/themes/eBusiness/images/rss_s1.gif" />RSS feeds are a great way to connect with your customers and update them with new news and features on your site. It can really bring in the money.
    </div><!--End home-left-->
    <div id="home-right">
    <h3>5 REASONS TO HIRE ME NOW</h3>
    <ul>
    <li id="numbers1">I don't just design, I grow your business online &amp; ensure your success targets</li>
    <li id="numbers2">I have passion for my projects so choose to dedicate all my time &amp; effort into yours</li>
    <li id="numbers3">I'll take all the pressure off you or coach &amp; support you through it</li>
    <li id="numbers4">I believe that excellent customer service &amp; support is part of the package</li>
    <li id="numbers5">As an elite member of the PWDA I have access to the best resources in the world</li>
    </ul>
    </div><!--End home-right-->


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •