LazyDreamy

관리자 | 글쓰기

LazyDreamy » Search » Results » Articles

jQuery와 관련된 글 3개

  1. 2010/09/20 jQuery 회전 배너 (Rotating Banner)
  2. 2010/05/18 jQuery Input field control
  3. 2010/05/18 jQuery Text Highlighter plugin

LazyDreamy » Computer/Programming

jQuery 회전 배너 (Rotating Banner)

드림 | 2010/09/20 13:50

jqbanner

Rotating Banner http://www.mclelun.com/blog/2010/01/jquery-rotating-banner/

jQuery Corner http://www.malsup.com/jquery/corner/

 

두 가지 소스를 활용하였고, 마우스 오버 이벤트와 자동 이동 외에 강제 이동 부분을 추가했음.

 

Sample View : http://dream.nmain.net/sample/jquery/jqbanner/

JS (modified jqbanner.js) : http://dream.nmain.net/sample/jquery/jqbanner/jqbanner.js

2010/09/20 13:50 2010/09/20 13:50


태그

(go to top)

LazyDreamy » Computer/Programming

jQuery Input field control

드림 | 2010/05/18 15:58

text

get   $(‘input[name=inputname]’).val();

set   $(‘input[name=inputname]’).val(‘value’);


selectbox

get   $(‘select[name=selectname] > option:selected’).val();

set   $(‘select[name=selectname] > option[value=selectvalue]’).attr(‘selected’, ‘true’);


radio , checkbox

get   $(‘input[name=inputname]:checked’).val();

set   $(‘input[name=inputname]’).filter('input[value=selectvalue]').attr(‘checked’, ‘checked’);

set   $(‘input[name=inputname]’).filter('input[value=selectvalue]').attr(‘checked’, ‘’);

count    $(‘input[name=inputname]:checkbox:checked’).length;

2010/05/18 15:58 2010/05/18 15:58


태그

(go to top)

LazyDreamy » Computer/Programming

jQuery Text Highlighter plugin

드림 | 2010/05/18 10:01

http://www.unwrongest.com/projects/highlight/


How to use Highlight

You can throw both a string or an array on Highlight. Have a look at the example below. The first row is going to highlight the word acknowledgment, the second row is going to highlight both ‘matching’ and ‘class name’. The code shown in the example below has been executed in this page.

	$('.body').highlight("acknowledgment");
	$('.body').highlight(["matching","class name"]);

What actually happens is that the matching phrases are wrapped inside a span element with the class name highlight. Therefor you will also need to add some css code to get a visual result.

.highlight { background: #ff0; }
2010/05/18 10:01 2010/05/18 10:01


태그

(go to top)