'jquery'에 해당되는 글 3건

  1. 2021.02.15 [JQuery] Selectors 링크
  2. 2020.05.25 [Javascript] JQuery @(at) 처리 문제.
  3. 2013.05.09 [JavaScript] ExtJS & JQuery - Ajax 사용하기

[JQuery] Selectors 링크

ITWeb/개발일반 2021. 2. 15. 11:03

https://www.w3schools.com/jquery/jquery_ref_selectors.asp
http://gregfranko.com/jquery-best-practices/#/5

 

저는 주로 id selector 를 사용 합니다.

 

:

[Javascript] JQuery @(at) 처리 문제.

ITWeb/개발일반 2020. 5. 25. 12:19

$('#@id').removeClass('new').addClass('old');

 

여기서 @ 때문에 jquery 내부에서 오류가 발생을 합니다.

이럴 경우 DOM 을 직접 컨트롤 해주셔서 해결 하시면 됩니다.

 

var policyId = 'result' + policyName;

var el = document.getElementById(policyId);

 

el.classList.remove('new');

el.classList.add('old');

:

[JavaScript] ExtJS & JQuery - Ajax 사용하기

ITWeb/개발일반 2013. 5. 9. 10:32

[JQuery]

URL : http://jquery.com/download/

API : http://api.jquery.com/category/ajax/

Version : 1.9.1


[Code]

- 초간단 Post 예제 이며, Get 은 Query String 으로 넘기시면 됩니다. 또는 type 을 변경해 주세요.

function getSearchMatchAllJquery(){

var host = "localhost";

var port = "9200";

var currentPage = $('#currentPage').val();

var pageSize = $('#pageSize').val();

var pageLinkSize = $('#pageLinkSize').val();

var indices = $('#indices').val();


$.ajax({

type: "POST",

url: "/elasticsearch/data/getSearchMatchAll.do",

data: {

                host:host,

                port:port,

currentPage:currentPage,

pageSize:pageSize,

pageLinkSize:pageLinkSize,

indices:indices

}

}).done(function( result ) {

          $("#matchAllView").html(result );

});

}



[ExtJS]

URL : http://www.sencha.com/products/extjs/download/ 

API : http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.Ajax

Version : 4.2


[Code]

- Post 예제 이며, Get 방식은 아래 method 를 변경하시면 됩니다.

function getSearchMatchAllExtJs() {

    var host = "localhost";

    var port = "9200";

    var currentPage = $('#currentPage').val();

    var pageSize = $('#pageSize').val();

    var pageLinkSize = $('#pageLinkSize').val();

    var indices = $('#indices').val();

    

Ext.Ajax.request({

          url: '/elasticsearch/data/getSearchMatchAll.do',

          method: 'POST',

          success: function(response, opts) {

              var obj = Ext.decode(response.responseText);

  $("#matchAllView").html(obj );

          },

          failure: function(response, opts) {

              $("#matchAllView").html(response.status );

          },

          scope: this,

          params: {

host:host,

port:port,

currentPage:currentPage,

pageSize:pageSize,

pageLinkSize:pageLinkSize,

indices:indices

          }

});

}


: