• 12-07-2014, 00:01:43
    #1
    Arkadaşlar editlediğim bir tema var. jQuery çakışması yapıyor. Nerde ve nasıl olduğunu bulamadım. Çalışması engellenen şey, konuların üzerine gelindiğinde konunun içeriği çıkıyor, ve slider eklemek istiyorum temaya ama eklediğimde içerik çıkmıyor, baloncuk halinde kodları gösteriyor.

    /**
     * Hover Caption - jQuery plugin to add a simple hover effect
     * and caption to images.
     *
     * Source Code: [url]https://github.com/coryschires/hover-caption[/url]
     *
     * Copyright (c) 2011 Cory Schires (coryschires.com)
     * Dual licensed under the MIT and GPL licenses:
     * [url]http://www.opensource.org/licenses/mit-license.php[/url]
     * [url]http://www.gnu.org/licenses/gpl.html[/url]
     *
     * Version: 0.2.0
     */
    
    
    (function($) {
    
      $.hover_caption = {
        defaults: {
          caption_font_size: '18px',
          caption_color: 'white',
          caption_bold: true,
          caption_default: "Your title here"
        }
      }
    
        $.fn.extend({
            hover_caption: function(config) {
    
          var config = $.extend({}, $.hover_caption.defaults, config);
    
            return this.each(function() {
    
              var image = $(this);
    
              // set variable for wrapper div
              var width = image.width();
              var height = image.height();
    
              // variables for caption
              var caption_padding = width * .07; // dynamic margin depending on img width
    
              //  set caption to title attr if set
              var caption = image.attr('title') ? image.attr('title') : config.caption_default;
    
              // add necessary html and css
              image
                .css({
                  'z-index': '-1',
                  'position': 'relative'
                })
               .wrap('<div>')
               .parent()
                .css({
                  'width': width,
                  'height': height
                })
                .prepend('<h3>'+ caption +'</h3>')
                .find('h3')
                .addClass('hover_caption_caption') // use this hook for additional styling
                .css({
                  'padding': caption_padding,
                  'color': config.caption_color,
                  'width': width,
                  'font-size': config.caption_font_size,
                  'position': 'absolute',
                  'margin': 0
                })
                .hide();
    
                if (config.caption_bold) { image.css('font-weight', 'bold') };
    
                // add hover event to toggle message
                image.parent().hover(function() {
                  $(this).addClass('hover_caption').find('h3').show();
                }, function() {
                  $(this).removeClass('hover_caption').find('h3').hide();
                });
    
              })
            }
        })
    
    })(jQuery);
    Slider ise revslider. Yardım edebilecek arkadaşlara şimdiden teşekkürler.
  • 13-07-2014, 01:14:53
    #2
    çakışma varsa jquery html içinden çağrılmıştır. Eklentilerin ya da temanda jquery'nin çağrıldığı yeri bul. Normalde çakışma olmaması için wp_enqueue_script fonksiyonu ile çağrılması gerekiyor.