Uncaught TypeError: $(this).search is not a function

Linuxe

Uncaught TypeError: $(this).search is not a function

$(document).ready(function(){
    $('#caption').on('keypress', function () { 
            var n = $(this).search('#');
            if(n != "-1"){
                window.alert("There's a hash");
            }else{
                 window.alert("There's not a hash");
            }


    });
});
skhugh

search is a JavaScript method for a string type.

So if you want to use search, your line var n = $(this).search('#'); should be changed to var n = $(this).val().search('#'); or var n = $(this).text().search('#'); depending on the tag of #caption element.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Uncaught TypeError: table.search(...).draw is not a function

From Dev

Uncaught TypeError: $(...).stellar is not a function

From Dev

Uncaught TypeError: $.growl is not a function

From Dev

Uncaught TypeError: #<Object> is not a function

From Dev

Uncaught TypeError:Undefined is not a function

From Java

Uncaught TypeError: $.post is not a function

From Dev

Uncaught TypeError: $(...).tokenfield is not a function

From Dev

Uncaught TypeError: $(...).velocity is not a function

From Dev

Uncaught TypeError: $(...).ready is not a function

From Dev

Uncaught TypeError: undefined is not a function

From Dev

Uncaught TypeError: undefined is not a function

From Dev

Uncaught TypeError: Object function

From Dev

Uncaught TypeError: number is not a function

From Dev

Uncaught TypeError: $(…).on is not a function

From Dev

Uncaught TypeError: undefined is not a function

From Dev

jQuery - Uncaught TypeError: $ is not a function

From Dev

Uncaught TypeError: $(...).autocomplete is not a function

From Dev

uncaught typeerror $(...).swipe is not a function

From Dev

Uncaught TypeError: $(...).draggable is not a function

From Dev

Uncaught TypeError: MyView is not a function

From Dev

Uncaught TypeError: response is not a function

From Dev

Uncaught TypeError: method is not a function

From Dev

Uncaught TypeError: lang is not a function

From Dev

Uncaught TypeError: undefined is not a function

From Dev

Uncaught TypeError: undefined is not a function

From Dev

Uncaught TypeError: undefined is not a function?

From Dev

Uncaught TypeError: undefined is not a function $

From Dev

Javascript: Uncaught TypeError: not a function

From Dev

Uncaught TypeError: a(...).countdown is not a function

Related Related

  1. 1

    Uncaught TypeError: table.search(...).draw is not a function

  2. 2

    Uncaught TypeError: $(...).stellar is not a function

  3. 3

    Uncaught TypeError: $.growl is not a function

  4. 4

    Uncaught TypeError: #<Object> is not a function

  5. 5

    Uncaught TypeError:Undefined is not a function

  6. 6

    Uncaught TypeError: $.post is not a function

  7. 7

    Uncaught TypeError: $(...).tokenfield is not a function

  8. 8

    Uncaught TypeError: $(...).velocity is not a function

  9. 9

    Uncaught TypeError: $(...).ready is not a function

  10. 10

    Uncaught TypeError: undefined is not a function

  11. 11

    Uncaught TypeError: undefined is not a function

  12. 12

    Uncaught TypeError: Object function

  13. 13

    Uncaught TypeError: number is not a function

  14. 14

    Uncaught TypeError: $(…).on is not a function

  15. 15

    Uncaught TypeError: undefined is not a function

  16. 16

    jQuery - Uncaught TypeError: $ is not a function

  17. 17

    Uncaught TypeError: $(...).autocomplete is not a function

  18. 18

    uncaught typeerror $(...).swipe is not a function

  19. 19

    Uncaught TypeError: $(...).draggable is not a function

  20. 20

    Uncaught TypeError: MyView is not a function

  21. 21

    Uncaught TypeError: response is not a function

  22. 22

    Uncaught TypeError: method is not a function

  23. 23

    Uncaught TypeError: lang is not a function

  24. 24

    Uncaught TypeError: undefined is not a function

  25. 25

    Uncaught TypeError: undefined is not a function

  26. 26

    Uncaught TypeError: undefined is not a function?

  27. 27

    Uncaught TypeError: undefined is not a function $

  28. 28

    Javascript: Uncaught TypeError: not a function

  29. 29

    Uncaught TypeError: a(...).countdown is not a function

HotTag

Archive