js not working :(

Discussion in 'JavaScript' started by vOlLvEriNe, Feb 6, 2014.

  1. #1
    hi all
    I'm using html5 audio player and auto complete in a web,
    html5 audio player requires jquery-ui-1.8.2.custom.min.js and auto complete requires
    http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.js

    if I add both, auto complete not working, If remove http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.js then audio player not working, suggest me what should I do ???
     
    Solved! View solution.
    vOlLvEriNe, Feb 6, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    To use jquery-ui you need to have jquery.js running first - it won't work without the basic jquery framework. If autocomplete stops working when adding jquery-ui, it's horrenduously badly coded, and you should try to find another jquery-plugin that does the same thing.
     
    PoPSiCLe, Feb 7, 2014 IP
  3. vOlLvEriNe

    vOlLvEriNe Member

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    No, When I Add jquery.js then auto complet not work
     
    vOlLvEriNe, Feb 7, 2014 IP
  4. vOlLvEriNe

    vOlLvEriNe Member

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    see this page

    http://imp3skulls.com/play/5/the-monster-feat-rihanna/53e723abce073fdbed4e0c64bac8b093&ex=s

    player plays the song, but auto complete not working, here

    http://imp3skulls.com/download/5/the-monster-feat-rihanna/53e723abce073fdbed4e0c64bac8b093&ex=s

    auto complete working fine, coz jquery.js not linked
     
    vOlLvEriNe, Feb 7, 2014 IP
  5. #5
    *headdesk*
    Have you LOOKED at the code at all? You're including jquery.min.js on the second link you posted - if you didn't, the autocomplete WOULD NOT WORK (as it REQUIRES jquery to run). Now that we've got that out of the way - you're also including jQuery twice on the first link, which might cause trouble (especially if they're different versions, and you're also including jquery next-to-last, instead of BEFORE the other scripts on the page).
    How about reading up a bit?
    First:
    remove both instances of jquery, and replace the top script-include with the jquery you're including last.
    Second:
    make sure jquery loads FIRST, and then all other scripts after that
    Third:
    I didn't check for this, but if you're using other frameworks as well, don't - that WILL cause problems when you don't know what you're doing
     
    PoPSiCLe, Feb 7, 2014 IP
  6. vOlLvEriNe

    vOlLvEriNe Member

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #6
    Thanks :)
     
    vOlLvEriNe, Feb 7, 2014 IP