Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts

    jQuery / Reveal issue

    Hello, everyone.

    I'm having an issue with the Reveal plugin for jQuery. In the <head> tag, I am loading reveal.css, jquery-1.6.1.min.js, and jQuery.reveal.js.

    At the bottom of the page, I am loading the following:
    Code:
    <div id="editModal" class="reveal-modal"></div>
    <script type="text/javascript">
      function showeditwindow(whattoshow){
        $("#editModal").load(whattoshow, function(){
          $("#editModal").reveal();
          });
        }
      function cancelbutton(){
        $("#editModal").trigger('reveal:close');
        }
    </script>
    I have an anchor with href="javascript:void(0);" and an onclick that calls the showeditwindow(); function. When I click it, FF error console reports that $("#editModal").reveal is not a function.

    Has anyone run across this, before?

    Thank you,
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #2
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Post all code for the page and I'll see if I can see what's happening.

  • #3
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    Unfortunately, that is not possible. My development system is isolated from the internet - the company is very security conscious.

    The code that I have provided, so far, was manually typed while looking at my dev system monitor.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #4
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    question - you are using jquery, why bother using in line onclick attributes inline instead of using .click() ?


    - Without more info, Id guess the jquery library is not loading at all.

    if you dont know how to troubleshoot using the browsers console, then try entering the link to your jquery file directly in the browser and see what happens, at least you can narrow down the problem.

  • #5
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    The jQuery is loading. In the jquery.reveal.js file I placed an alert(jQuery.fn.jquery) - it displayed "1.6.1" when the link was clicked.

    RE: onclick - I'm new to jQuery. Still doing some "old school" scripting while I get the hang of it.

    I know how to troubleshoot via console - the error message I posted is what is being reported. If I use F12 in IE8, it says that an argument called "finally" in jQuery "doesn't support that method". Well, I can't edit the jQuery file, so what to do?

    Thank you for your help.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #6
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    Addendum:

    In Chrome, if I open the Developer Tools plugin and click on the link, I get the following on the FIRST click:
    Code:
    Uncaught TypeError: Object [object Object] has no method 'reveal'                        index.cfm:745
    (anonymous function)                                                                                              index.cfm:745
    jQuery.extend.each                                                                                                 jquery-1.6.1.js:625
    jQuery.fn.jQuery.each                                                                                              jquery-1.6.1.js:265
    jQuery.fn.extend.load.jQuery.ajax.complete                                                                  jquery-1.6.1.js:6787
    jQuery.extend._Deferred.deferred.resolveWith                                                               jquery-1.6.1.js:995
    done                                                                                                                     jquery-1.6.1.js:7143
    jQuery.ajaxTransport.send.callback                                                                            jquery-1.6.1.js:7907
    Then I get the following on each subsequent click:
    Code:
    Uncaught TypeError: Object [object Object] has no method 'reveal'                        index.cfm:745
    (anonymous function)                                                                                              index.cfm:745
    e.extend.each
    e.fn.e.each
    f.fn.extend.load.f.ajax.complete
    f.extend._Deferred.e.resolveWith
    w
    f.support.ajax.f.ajaxTransport.send.d
    Hope this helps.
    Last edited by WolfShade; 08-23-2012 at 07:00 PM.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #7
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    ok, so we know it gets that far then. Well the reveal plugin downlaods with jquery version 1.4.4 and you are using a different version. Perhaps double check you are not loading more than one version on the page, then perhaps try a newer version of jquery or the one the reveal plugin shipped with.

    this is a bug report I found reported for version 1.6.1, possibly related - http://bugs.jquery.com/ticket/9033

  • #8
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    I've checked and there is only one version of jQuery and one version of Reveal being loaded. The bug you mention could be the culprit. Unfortunately, I can only change the jQuery version in my development environment - I have no control over production. Discussing this with the project manager, the decision was made to not use the Reveal library, opting instead to just direct the browser to another page. I just don't have time to try to troubleshoot this, anymore. It's crunch time.

    Thank you, DanInMa, for your help.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".


  •  

    Posting Permissions

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