[jQuery] FCKEditor Plugin and Validation Plugin

2010-01-30 Thread David .Wu
http://www.fyneworks.com/jquery/FCKEditor/ The FCKEditor home page mentioned it support the Validation Plugin, but when I use both of it, but even I type many words on the textarea which replaced by the FCKEditor via FCKEditor Plugin, it's always shows the error message that the field is empty, ho

[jQuery] Wrap question

2009-12-20 Thread David .Wu
I want to make a div become 12346789 This is my solution, but I want to ask for better one. /** * Wrap Table */ (function() { $.fn.dramaWrapTable = function($obj) { var $tbl = '12346789'; return this.each(function() {

[jQuery] customize uplodify

2009-12-16 Thread David .Wu
http://www.uploadify.com/ This is the best jQuery upload plugin I ever used, I want to add one function when upload jQuery(queue).append('\ \ . .. I add a input field in it's js code, and I hope the value will be send with the file when

[jQuery] Ajax response back question

2009-12-01 Thread David .Wu
$(function() { $('li').each(function() { var $id = $(this).attr('id'); $.post('getImg.php', {id: $id}, function($data) { // How to do it? }); }); }); I want to let each li use ajax load their own image an

[jQuery] Can't get image's dimension under a hidden object

2009-11-19 Thread David .Wu
1. $(window).load(function() { alert($('#img1').width()); }); 2. $(window).load(function() { alert($('#img2').width()); }); case 1 can get the dimension, but case 2 can't, how to get it?

[jQuery] Can't get the image width

2009-11-19 Thread David .Wu
1. alert($('#img1').width()); 2. alert($('#img2').width()); case 1 can get the width of the image, but case 2 will fail, how to solve this problem?

[jQuery] slider question

2009-11-18 Thread David .Wu
http://www.switchonthecode.com/tutorials/using-jquery-slider-to-scroll-a-div If use jQuery slider directly, the handle box will not fit the slider track but in that website, it's totally fit the slider, and I didn't see anything particular in his code how to do that?

[jQuery] How to check is the object with the css property?

2009-10-17 Thread David .Wu
$('div').each(function() { // How to know the div have position property or not? });

[jQuery] What's different from keyCode to which?

2009-10-06 Thread David .Wu
keyCode and which will get the same value, so anything different? $(function() { $(window).keydown(function(e) { console.log(e.keyCode); console.log(e.which); }); });

[jQuery] How to print tag name

2009-09-29 Thread David .Wu
The code below show [ td ], can I got the tagName like "td"? 1 console.log($('table:first tr').find(':first-child'));

[jQuery] Re: How to combine event?

2009-09-27 Thread David .Wu
#x27;url(hand.cur), default'; >          $(this).css({cursor: myCursor}); >         }); > > Hope that helps. > > --Karl > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Sep 25, 2009, at 1:48 AM, David .Wu wrote: > > > > > event mousedown and

[jQuery] Re: How to combine event?

2009-09-27 Thread David .Wu
wn mouseup mouseout', function(event) { >          var myCursor = (event.type == 'mousedown') ? 'url(grab.cur),   > default' : 'url(hand.cur), default'; >          $(this).css({cursor: myCursor}); >         }); > > Hope that helps. >

[jQuery] How to combine event?

2009-09-24 Thread David .Wu
event mousedown and mouseup and mouseout actually do the same thing, how to combine it? $('a#cursor') .css({cursor: 'url(hand.cur), default'}) .click(function() { return false; }) .mousedown(function() { $(this).css({cursor: 'url(grab.cur),

[jQuery] Re: ajax xml question

2009-09-19 Thread David .Wu
Yup, it will be correct, so weird, why does Google's character wrong. On 9月18日, 下午7時44分, lanxiazhi wrote: > you may request the a.php directly in the browser ,and see if the charactors > display correctly. > 2009/9/18 David .Wu > > > > > > > it's no

[jQuery] Re: ajax xml question

2009-09-18 Thread David .Wu
it's not work actually. On 9月18日, 下午6時19分, lanxiazhi wrote: > Now you will need to change the header: > header('Content-Type: text/xml; charset=UTF-8');

[jQuery] Re: ajax xml question

2009-09-17 Thread David .Wu
As the matter of fact, I execute the weather.php like weather.php? weather=1 and the character was right, so the problem is happend when ajax delivery. On 9月18日, 下午2時39分, "David .Wu" wrote: > I am using utf-8 too. > > On 9月18日, 下午2時27分, Steven Yang wrote: > > > I t

[jQuery] Re: ajax xml question

2009-09-17 Thread David .Wu
I am using utf-8 too. On 9月18日, 下午2時27分, Steven Yang wrote: > I think you might have to check the encoding that google is usingI think > google should be using UTF-8. check the encoding on your side. > > On Fri, Sep 18, 2009 at 2:11 PM, David .Wu wrote: > > > But I

[jQuery] Re: ajax xml question

2009-09-17 Thread David .Wu
But I got one more question http://www.google.com/ig/api?hl=zh-tw&weather=Changhua This is the weather condition that response by my language, and the value become garbage characters exclude English, any solution? On 9月18日, 下午2時06分, "David .Wu" wrote: > terrific!!! thanks a lot

[jQuery] Re: ajax xml question

2009-09-17 Thread David .Wu
terrific!!! thanks a lot On 9月17日, 下午5時57分, lanxiazhi wrote: > specify content type to xml: > > header("Content-type: text/xml"); > if ($_GET['weather']) { > ...

[jQuery] ajax xml question

2009-09-16 Thread David .Wu
This is the source code that I want to get the weather from Google API, Firefox, Safari, Opera will work, but IE can't get the value, so I did some test, and I found the reason xml structure in php page $.get({"a.php"}, '', function() {}, "html"); // all browser work besides IE $.get({"a.php"}, '

[jQuery] Re: Ajax get contents question

2009-09-03 Thread David .Wu
it's funny that I can use find to get res2's html, why? filter res get res2 failed find res failed res2 get On 9月3日, 下午12時11分, "David .Wu" wrote: > This is my testing php code, I found if I use filter, I can only get > the content from first level of object, for exampl

[jQuery] Ajax get contents question

2009-09-02 Thread David .Wu
This is my testing php code, I found if I use filter, I can only get the content from first level of object, for example 12 I can get res's contents by filter, but I can't get res2's contents, is that possible that get any thing I want through ajax? 12'; exit; } ?> http://www.w3.org/199

[jQuery] save to pdf

2009-08-31 Thread David .Wu
Is there any plugin can let me save the part of pag as pdf?

[jQuery] Re: How to hide pop is blur

2009-08-13 Thread David .Wu
How to declare other thing? On 8月13日, 下午7時28分, Jon Banner wrote: > $('#show').click(function(){ >    $('#popup').fadeIn("slow", function(){ >       $(other things).click(function(){ >          $('#popup, #show').hide(); >       }); >  

[jQuery] How to hide pop is blur

2009-08-12 Thread David .Wu
There is a button control a div show or not, I want when you click other things then the div will disappear too exclude div itself and also the show button, how to do that? [html] . .. [JavaScript] $('#show').click(function(){ $('#popup').toggle(); });

[jQuery] How to get variable from iframe?

2009-08-10 Thread David .Wu
a.php .. var a = 123; Can I catch variable a in b.php?

[jQuery] Re: a select question

2009-08-03 Thread David .Wu
al Solutions, ibm.com > > Phone: 1-276-206-8393 > > E-mail: mjlaw...@us.ibm.com > > > 'Whether one believes in a religion or not, > > and whether one believes in rebirth or not, > > there isn't anyone who doesn't appreciate kindness and compassion..' >

[jQuery] Re: a select question

2009-08-03 Thread David .Wu
al Solutions, ibm.com > > Phone: 1-276-206-8393 > > E-mail: mjlaw...@us.ibm.com > > > 'Whether one believes in a religion or not, > > and whether one believes in rebirth or not, > > there isn't anyone who doesn't appreciate kindness and compassion..' >

[jQuery] a select question

2009-08-03 Thread David .Wu
if I have 3 div, how to filter the div without class abc?

[jQuery] Re: Does IE support live?

2009-08-03 Thread David .Wu
           alert(1); >        }); > > } > > I think this will fulfill your requirement . > > On Fri, Jul 31, 2009 at 12:28 PM, David .Wu wrote: > > > If I load b.html in firefox, alert(1) will work, but ont work in IE. > > > page a.html > > > >

[jQuery] Does IE support live?

2009-07-30 Thread David .Wu
If I load b.html in firefox, alert(1) will work, but ont work in IE. page a.html http://www.w3.org/1999/xhtml";> live $(function() { $.ajaxSetup({ cache: false }); $('#btn').click(function() { $('div:first').load('b.html');

[jQuery] Re: fn question

2009-07-30 Thread David .Wu
quot;,"blue") won't work > for your 1st case but works for the 2nd one. > > On Jul 30, 3:14 pm, "David .Wu" wrote: > > > > > I found these both work, so what is return for? > > > > > $.fn.btnClick = function() { > >    

[jQuery] fn question

2009-07-29 Thread David .Wu
I found these both work, so what is return for? $.fn.btnClick = function() { this.click(function() { alert('test'); }); } $('input#btn').btnClick(); $.fn.btnClick = function() { return this.click(function() { alert('test'); });

[jQuery] Can I catch the property of CSS filter?

2009-07-08 Thread David .Wu
the image is like $('img').css('filter') will get progid:DXImageTransform.Microsoft.AlphaImageLoader(src='aa.png') Can I get the aa.png directly?

[jQuery] image resize issue

2009-06-29 Thread David .Wu
我今天有兩個放大縮小按鈕,想讓user按放大時用js把一個100x72的圖片 以寬為主每次加4px等比放大,反之亦然,但不知道小數位數該如何取才能正確控制高度 等比放大的公式為 I have two button to let user enlarge or reduce a 100px x 72px image immediately on the page, 4px enlarge or reduce one time by width, but I don't know how to control the height to make resize proportionally.

[jQuery] Re: remove question

2009-06-13 Thread David .Wu
Nice trick. On 6月13日, 上午9時36分, brian wrote: > On Fri, Jun 12, 2009 at 2:37 PM, amuhlou wrote: > > > putting it all together, you'd get something like: > > > $('#div1').replaceWith($('#div2')).remove(); > > > first you find div1, then replace it with div2, then remove div1 > > There's no need for

[jQuery] json question.

2009-06-12 Thread David .Wu
This the html file I want to catch the object property inside obj and make them a json string like '{"div": [{"name": "div1", "w": "100", "h": "100"}, {"name": "div2", "w": "200", "h": "200" }], "img": [{"name:", "img1", "w": "50", "h": "50"}]}'; any suggestion to accomplish it? http://www.w3.

[jQuery] Re: jQuery, ajax, json, php

2009-06-12 Thread David .Wu
Regards, > > Anish** > > On Jun 11, 4:40 pm, "David .Wu" wrote: > > > If I send a json format to php, how to get the value from php? for > > example > > > front page > > > > var jsonStr = '{"name": "David", "a

[jQuery] Re: jQuery, ajax, json, php

2009-06-11 Thread David .Wu
= json_decode($json); > > echo $user['name']; > > > 2009/6/11 Val Cartei > > > > with data.name (data is the json object you pass to your success > > > function). Like: > > > > success: function(data) { > > >                alert(data.name)

[jQuery] remove question

2009-06-11 Thread David .Wu
Can I remove div1 but div2 keep there?

[jQuery] jQuery, ajax, json, php

2009-06-11 Thread David .Wu
If I send a json format to php, how to get the value from php? for example front page var jsonStr = '{"name": "David", "age", "23"}'; $.ajax({ url: 'json.php', type: 'POST', cache: false, data: {json: jsonStr}, success: function(data) { ale

[jQuery] Re: How to flip the image?

2009-06-11 Thread David .Wu
transitioning to an > identical image. > > I did this on the right hand image on this example: > > http://dev2.savingforchildren.co.uk/mjs/curtain2.epl > > Perhaps there's an easier way but I don't know of it. > > Michael > > On Wed, Jun 10, 2009 at 1

[jQuery] How to flip the image?

2009-06-10 Thread David .Wu
Can I make image vertical or horizontal flip by jQuery?

[jQuery] How to get option's position

2009-06-08 Thread David .Wu
if I have a menu, how to get the position of the option after I select one of it? for example, if I choose b, and the position should b 2. a b c

[jQuery] Re: How to get file name

2009-04-28 Thread David .Wu
I got it, thanks everyone. $('img').attr('src').split('/').pop(); On 4月28日, 下午6時39分, Remon Oldenbeuving wrote: > I dont think there's a real jQuery way, you could use regular > expressions, or maybe split the string with .split('/'

[jQuery] Re: How to get file name

2009-04-28 Thread David .Wu
If I use split, how to get the last array? On 4月28日, 下午6時39分, Remon Oldenbeuving wrote: > I dont think there's a real jQuery way, you could use regular > expressions, or maybe split the string with .split('/') > > On 28 apr 2009, at 10:36, "David .Wu"

[jQuery] How to get file name

2009-04-28 Thread David .Wu
$('img').attr('src') -> This will get images/xxx.gif How to get xxx.gif by jQuery?

[jQuery] How to catch mouse position inside an area?

2009-04-22 Thread David .Wu
If I got a 400px width div, can I get the offset left distance from mouse to the div in where I click?

[jQuery] How to customize scroll bar

2009-04-21 Thread David .Wu
I use jQuery slider ui, and I want to customize the scroll bar http://penta.twnoc.com/product_detail.php?type=1&sub=1 almost done, but only one thing, when you scroll handle box to right, the box will over the scroll bar, and I don't know how to fix it.

[jQuery] A filter question

2009-04-20 Thread David .Wu
If I have 5 div, have the same name but different rel, how to find out the div which hidden and rel is 2?

[jQuery] Re: How to find a div's which have background-img?

2009-02-25 Thread David .Wu
console.log('yes'); } else { console.log('no'); } }); }); On 2月25日, 下午12時53分, "David .Wu" wrote: > I have hundred or css class need that, I am afraid

[jQuery] Re: How to find a div's which have background-img?

2009-02-24 Thread David .Wu
I have hundred or css class need that, I am afraid that it's better to search which has the property. On 2月25日, 下午12時18分, Steven Yang wrote: > according to your case > use$(".box") > or > $("div .box") > since all elements with class "box" will have background image

[jQuery] How to find a div's which have background-img?

2009-02-24 Thread David .Wu
for example .box { background-image: url(images/png_back.png); } Can I filter the div which have backround-image?

[jQuery] Disaster with Png fix

2009-02-21 Thread David .Wu
IE6 doesn't support transparent png file, so people usually use javascript to fix it. This is what I choose http://www.twinhelix.com/css/iepngfix/ but when I use it with ui such as $.dialog() in IE6, the effect become pretty slow for example http://www.yuri.com.tw/member_register.php This is a

[jQuery] Re: blockUI issue

2009-02-20 Thread David .Wu
this is demo page. http://www.yuri.com.tw/debug/blockui.php On 2月21日, 上午1時56分, "David .Wu" wrote: > I found it's not work in IE7 with flash, is it?

[jQuery] blockUI issue

2009-02-20 Thread David .Wu
I found it's not work in IE7 with flash, is it?

[jQuery] ajax question

2009-02-20 Thread David .Wu
if we want to transfer some variable to another page by ajax, we use data: {a: 1, b: 2} and it will send like xxx.php?a=1&b=2 but if a is not a constant variable, such as var $a = x data: {$a: 1} I want it become xxx.php?x=1 var $a = y data: {$a: 1} I want it become xxx.php?y=1 how to do that?

[jQuery] clone form information

2009-02-16 Thread David .Wu
sometimes we have two form that almost the same fields, so we will give client a clone button if the information is complete the same, this is how I do now, is there any easy way to accomplish that? http://www.w3.org/1999/xhtml";> clone form