ThemeShaper Forums » Thematic

javascript conflict with dropdowns

(3 posts)
  • Started 5 years ago by alst
  • Latest reply from alst
  • This topic is resolved
  1. alst

    Hi, have this code in my site which I call on the single.php page under content.
    It puts an icon beside links in ie6...i know...i know...

    It needs jquery but isn't working with the version included with wordpress. When I call jquery 1.2.6 separately to make it work, it breaks the superfish dropdowns,

    any ideas:

    $(document).ready(function() {
    var fileTypes = {
      // extension: 'image file'
      doc: 'doc.gif',
      xls: 'xls.gif',
      pdf: 'http://xxx/wordpress/wp-content/themes/cdhb/images/icons/4/24x24/pdf_file.jpg',
      ppt: 'http://xxx/wordpress/wp-content/themes/cdhb/images/icons/5/24x24/ppt_file.jpg'
    // then, loop over the object
    // using jQuery's $.each()
    $.each(fileTypes, function(extension,image) {
      $('a[href$="' + extension + '"]').
          paddingLeft: '30px',
          paddingTop: '2px',
          paddingRight: '2px',
          background: 'transparent url("' + image + '") no-repeat center left'
    Posted 5 years ago #
  2. This has been discussed before, but
    Try adding this above the $(document).ready(function() {


    and change your "$" to "jQuery"

    Posted 5 years ago #
  3. alst

    thanks heaps, worked a charm.

    Posted 5 years ago #

RSS feed for this topic


You must log in to post.