1

I am really new to jQuery so sorry if this is a stupid question but can someone tell me why my jQuery statements aren't working?

http://alanbrandt.com

I have a script called scripts.min.js on the above wordpress site and a large number of the functions don't seem to work, it uses the modernizr scripts is this what is causing the issue?

EG:

<div id="horizontal-scroll" class="">

<script type='text/javascript'>
jQuery(function (e) {
    e("a.expandStories")
        .click(function () {
        e("#horizontal-scroll")
            .fadeIn(950);
        return !1
    })
});


jQuery(function (e) {
e("#horizontal-scroll")
        .jScrollPane({
        autoReinitialise: !0,
        verticalDragMinHeight: 60,
        verticalDragMaxHeight: 60,
        scrollbarWidth: 6
    });
});
</script>

Can someone please tell me why these functions aren't working? What am I doing wrong?

Cheers! :)

myatix
  • 75
  • 2
  • 12
  • 1
    Look at your JS console for errors. – Blender Jun 08 '13 at 21:19
  • 1
    Why `e` before selectors?replace `e` and query with `$`. – Omar Jun 08 '13 at 21:22
  • `div#horizontal-scroll` also needs a closing div tag, but that's not really the central issue. – Andbdrew Jun 08 '13 at 21:49
  • my gosh! `jQuery(function(e){e('body').click(function(evt){console.log(evt)})})` works! I didn't know you could do that! I still don't think you should do it, but it's pretty cool that you can! – Andbdrew Jun 09 '13 at 00:35

1 Answers1

0

Hi opening the site above with Google Chrome, got this errors:

Uncaught TypeError: Object [object Object] has no method 'inFieldLabels' scripts.min.js:200

and also this font Failed to load resource the server responded with a status of 404 (Not Found) http://alanbrandt.com/wp-content/themes/alanbrandt/fonts/bryantpro-medium-webfont.woff

there are more conglicts between this plugin and other frameworks, for example: In-field labels plugin not working

and also maybe relevant Using Google JSAPI breaks my infieldlabel javascript, why and how do I fix it?

in the last its suggested the use of

$j = jQuery.noConflict(); check what frameworks you have installed and any conflicts with this plugin

hope it helps

Community
  • 1
  • 1
dotmindlabs
  • 778
  • 1
  • 12
  • 35