[jQuery] Re: Copy content from one field to another
Try this $(#billing_first_name1).attr(value,$(#shiping_first_name).val()) $(#billing_last_name1).attr(value,$(#shiping_last_name).val()) Thanks On Tue, Oct 20, 2009 at 8:55 AM, Ghprod greenhousep...@yahoo.co.id wrote: Hi ... if u work with newer version of jquery, maybe u'll change $ into jQuery :) Hope it helps :) regards
[jQuery] Re: superfish navbar - how do I center the whole bar?
Put the ul inside a div. I think it will work On Tue, Oct 20, 2009 at 9:05 AM, Shawn shallway...@gmail.com wrote: I'm using a navbar with superfish. I simply put my menu list inside a wrapper so the markup looks like this: div class=navbar-wrapper ul class=sf-menu sf-navbar div li.../li li.../li li.../li /ul /div /div now I want to make the navbar-wrapper 100% of width and the navbar to be centered in it, I thought it should be simple just do the following css trick div.navbar-wrapper{ width:100%; text-align:center; } However this didn't work, the supersish menu just didn't get centered. How can I fix this? Thanks.
[jQuery] Re: How to get active image centeres in jCarousel?
jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ start: 3 }); }); http://sorgalla.com/projects/jcarousel/examples/static_start.html Thanks On Tue, Oct 20, 2009 at 8:49 AM, Ghprod greenhousep...@yahoo.co.id wrote: Hi, i use jcarousel in one of my project. As we know active image in jCarousel, default set in the left or right. Can i customized so active image will centered? Let say there's 5 image and i want image number 3 in the middle is set as active image :) regards thnx
[jQuery] Re: password initial value without masking ****
either you ca maintain two input element (like facebook), or make an image of passwordand set the image to textbox background, on focus or click just remove the background-image. On Tue, Oct 20, 2009 at 2:09 PM, Bi Jing beco...@gmail.com wrote: For now, our project use two input elements to implement this, we still can not get easier way. Actually, not only password, but also text element, you need two inputs, one hidden one shown. Becoder. On Tue, Oct 20, 2009 at 4:08 PM, waseem sabjee waseemsab...@gmail.comwrote: ok,why not absolutely position some text on a password box and hide that text on password box focus ? On Tue, Oct 20, 2009 at 10:05 AM, Marco Barbosa marco.barbos...@gmail.com wrote: Hmmm. This is more complicated than I thought. waseem, having 2 input fields doesn't seem correct. Thought it might work I will have to pass that solution for this specific site. Liam, Your code didn't work either, I don't know why. Jörn, this watermark plugin is interesting but I don't want to use jquery ui on this site. That's because I'm already using that cleanField function and it would be redundant to have a plugin just for the login form. Also I gave it a try and the label didn't stay inside the input. So If i have to manually position it there, then it's another reason I will pass this solution as well. I though a simple jquery would do this. I think I will leave it masked and use a tooltip or something. Thanks guys! On Oct 19, 5:54 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Instead of replacing the input, display a label above it. Seehttp:// wiki.jqueryui.com/Watermark Jörn On Mon, Oct 19, 2009 at 4:17 PM, Liam Potter radioactiv...@gmail.com wrote: Here is how I do it. Just markup the form like normal (I use a definition list to lay out my forms) $(input:password).each(function(){ var $currentPass = $(this) $currentPass.css({opacity:0}); $currentPass.before('input type=text value=Password class=removeit style=position:absolute;z-index:10; /'); var $visiblePassword = $(.removeit); $visiblePassword.focus(function () { $(this).css({opacity:0}); $currentPass.focus().css({opacity:1}); }); $currentPass.blur( function () { if ( $currentPass.attr(value) == ){ $currentPass.css({opacity:0}); $visiblePassword.css({opacity:1}).attr(value,Password); } }); }); waseem sabjee wrote: ah yes i forgot. you would get access denied when tried to change an input type property the best way is to have two input types and just hide one and show the other but i have a solution for you the html !-- The following html of two input types - we gonna switch between them-- input type=text class=textinput value=Passowrd / input type=password class=passinput value= / the css style type=text/css /*first we need to hide the password input*/ .passinput { display:none; } /style the js script type=text/javascript $(function() { // declare your input types var textinput = $(.textinput); var passinput = $(.passinput); // on text input focus - hide text input and show and focus on password input textinput.focus() { textinput.blur(); textinput.hide(); passinput.show(); passinput.focus(); }); // on password input blud hide password input and show and focus on text input passinput.blur(function() { passinput.blur(); passinput.hide(); textinput.show(); textinput.focus(); }); }); /script On Mon, Oct 19, 2009 at 2:51 PM, Marco Barbosa marco.barbos...@gmail.commailto: marco.barbos...@gmail.com wrote: Hi waseem! Thanks for your reply. Something's wrong with this line: $(#password).attr({type:'text'}); I tried changing to: $(#password).attr('type','text'}); but still no go. I have to comment out to get the other JS stuff on the site working. The rest of the code seems Ok. What could it be? I like your solution, pretty simple :) I was wondering if we could put this inside the cleanField function but I guess it's not necessary. ~Marco On Oct 19, 2:32 pm, waseem sabjee waseemsab...@gmail.com mailto:waseemsab...@gmail.com wrote: // set the initial type to text $(.mypasswordfield).attr({ type:'text'
[jQuery] Re: Copy content from one field to another
change the id of lastname of billing information to billing_last_name Thanks On Tue, Oct 20, 2009 at 5:44 PM, ReynierPM rper...@uci.cu wrote: rupak mandal wrote: Try this $(#billing_first_name1).attr(value,$(#shiping_first_name).val()) $(#billing_last_name1).attr(value,$(#shiping_last_name).val()) Maybe I'm doing something wrong because it not works. Check the code online at http://jose-couto.com/pintpal4/order_pintpal.html. Thanks for all the help and the time -- Saludos ReynierPM
[jQuery] Re: Copy content from one field to another
sorry change the id of lastname of shiping information to shiping_first_name Thanks On Tue, Oct 20, 2009 at 6:04 PM, rupak mandal rupakn...@gmail.com wrote: change the id of lastname of billing information to billing_last_name Thanks On Tue, Oct 20, 2009 at 5:44 PM, ReynierPM rper...@uci.cu wrote: rupak mandal wrote: Try this $(#billing_first_name1).attr(value,$(#shiping_first_name).val()) $(#billing_last_name1).attr(value,$(#shiping_last_name).val()) Maybe I'm doing something wrong because it not works. Check the code online at http://jose-couto.com/pintpal4/order_pintpal.html. Thanks for all the help and the time -- Saludos ReynierPM
[jQuery] Re: Copy content from one field to another
function doCopy(){ if($('#same').is(':checked')) { $(#billing_first_name).attr(value, $('#shiping_first_name').val()); } else { $(#billing_first_name).attr(value,); } } I have another question related to this. How can I clear the fields if I uncheck the checkbox? I mean when marked fill fields as I do until now and when unmarked empty those fields? How can I check when the checkbox is checked or not? Cheers -- ReynierPM
[jQuery] Re: Get url from iframe
no because after clicking on any search link, it was redirect to new web page. But src remains same. On Mon, Oct 19, 2009 at 9:45 PM, brian zijn.digi...@gmail.com wrote: I believe you can get it from the src attirbute. On Mon, Oct 19, 2009 at 7:37 AM, Rupak rupakn...@gmail.com wrote: Hi all, I have an ifram in a page. iframe contains google.com (google search). from there if the user search for a key word, i and click on a link.Is there a way to get the url of newly open page inside the iframe. Plz help me.. thanks Rupak
[jQuery] Re: show/hide with embed
if the problem is reload then add return false at the end or the function On Fri, Oct 16, 2009 at 6:02 PM, ngreenwood6 ngreenwo...@gmail.com wrote: I tried doing that as well and it still does the same thing. It must be changing the display that makes it reload. To test all you have to do is create a div with embed code and call show/hide on it and you will see. On Oct 16, 3:02 am, Evgeny Bobovik bobo...@gmail.com wrote: Try to use this method: script type=text/javascript function showEmbed(){ if($(#test).css('display') == 'block'){ $(#test).css('display','none'); } else { $(#test).css('display', 'block'); }} /script Gk___ 2009/10/16 ngreenwood6 ngreenwo...@gmail.com:
[jQuery] Re: Superfish - Drop Down not displaying
Increase the hight of #pillmenu to 87px or as per your requirement. In template.css Thanks Rupak On Thu, Oct 15, 2009 at 5:47 PM, Superfish Query somirasoo...@gmail.comwrote: Hello, I am using the Superfish Module and have been able to successfully install and use it. The problem I am having is that the sub menus are being drawn behind the banner / header area and therefore you are not able to see them or click on them. Please let me know whether to change the index.php or .css file to see the drop down menus properly. Following are details you might need: Joomla Version: 1.5.12 Template:Fashion Look (http://joomla15.siteground.com/? template=siteground-j15-93) Website: www.e-sols.com/webtest Please help Regards
[jQuery] Re: Superfish menu problem.
Drop-down menu is working, but it will no display due to overflow:hidden in clear. You have to make some changes. Add height width in tail-top-menu and remove clear class from that div. .tail-top-menu { height:30px; width:100% } and also add height in .sf-menu a sf-menu li class according to requirement ... I think this will resolve your problem. Thanks Rupak On Wed, Sep 16, 2009 at 11:04 AM, sholland suzanna.holl...@gmail.comwrote: Here aree the CSS styles being applied to that menu position by the template and by the superfish css. Thanks Suzanna ***TEMPLATE CSS* .tail-top-menu{ background:#f0f0f1 url(../images/top_menu_tail.gif) bottom left repeat-x;} ** body, td, th, div, p, label{ color:#838383; font:normal 12px/16px Arial, Helvetica, sans-serif; } a { color:#5D5D60; text-decoration:underline; } a:hover { color:#5D5D60 ; text-decoration:none } select{color:#878B8E; font-size:11px;} *** .clear{ width:100%; overflow:hidden;} *** * { padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; } * ul { list-style-type: disc; list-style-image: none; list-style-position: outside; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 15px; } .menu { margin-top: 14px; margin-right: 0pt; margin-bottom: 0px; margin-left: 31px; list-style-type: none; list-style-image: none; list-style-position: outside; padding-top: 1px; } END TEMPLATE CSS **SUPERFISH CSS .sf-menu, .sf-menu * { margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0pt; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; } .sf-menu { line-height: 1; } .sf-menu { float: left; margin-bottom: 1em; } a { color: #5d5d60; text-decoration: underline; } a:hover { color: #5d5d60; text-decoration: none; } .menu li a { color: #91caff; font-size: 13px; text-decoration: none; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 27px; } .menu li a:hover { color: #ff; text-decoration: underline; } .sf-menu, .sf-menu * { margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0pt; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; } .sf-menu a { display: block; position: relative; } .sf-menu a { border-left-width-value: 1px; border-left-style-value: solid; border-left-color-value: #ff; border-left-width-ltr-source: physical; border-left-width-rtl-source: physical; border-left-style-ltr-source: physical; border-left-style-rtl-source: physical; border-left-color-ltr-source: physical; border-left-color-rtl-source: physical; border-top-width: 1px; border-top-style: solid; border-top-color: #cfdeff; padding-top: 0.75em; padding-right: 1em; padding-bottom: 0.75em; padding-left: 1em; text-decoration: none; } .sf-menu a, .sf-menu a:visited { color: #1133aa; } .sf-menu a, .sf-menu a:visited { color: #1133aa; } .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background-color: #cfdeff; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; outline-color: -moz-use-text-color; outline-style: none; outline-width: 0pt; } .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background-color: #cfdeff; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; outline-color: -moz-use-text-color; outline-style: none; outline-width: 0pt; } END SUPERFISH CSS
[jQuery] Re: Object doesn't support this property or method in IE
I have face similar problem . Just check is there any html open or close tag missing in provStats.php. Thanks Rupak On Wed, Sep 16, 2009 at 12:16 PM, Ricardo ricardob...@gmail.com wrote: Hmm. No idea why it doesn't work in IE, but here are some general observations: You don't need the jQuery(function(){ part around the function. setTimeout(updateStatus, 2); // use the function object $(document).ready(updateStatus); //same here, pass the object, don't call the function. this can also go in the head script along with the rest See how that works out, here's the code: http://snipt.org/mogk And you could use some logic to make it less spaguetti too: http://snipt.org/mogl On Sep 15, 3:08 pm, knox203 sandf...@gmail.com wrote: Hello everyone, I have the following code that works great in Firefox, Opera, Safari, but fails to work in IE. Can anyone take a look and maybe tell me what I'm doing wrong? Thanks! head script type=text/javascript src=../conduit/jquery.js/script script function updateStatus(){ jQuery(function(){ $(#prov1hCount).load(source/provStats.php #prov1hCount); $(#prov1hOntime).load(source/provStats.php #prov1hOntime); $(#prov1hLate).load(source/provStats.php #prov1hLate); $(#prov1hPuAverage).load(source/provStats.php #prov1hPuAverage); $(#prov1hMTDPuAverage).load(source/provStats.php #prov1hMTDPuAverage); $(#prov2hCount).load(source/provStats.php #prov2hCount); $(#prov2hOntime).load(source/provStats.php #prov2hOntime); $(#prov2hLate).load(source/provStats.php #prov2hLate); $(#prov2hPuAverage).load(source/provStats.php #prov2hPuAverage); $(#prov2hDelAverage).load(source/provStats.php #prov2hDelAverage); $(#prov2hMTDPuAverage).load(source/provStats.php #prov2hMTDPuAverage); }); setTimeout(updateStatus(),2); } /script /head body ... /body script type=text/javascript $(document).ready(updateStatus()); /script
[jQuery] Re: Superfish menu problem.
1) Remove position:relative from .main class constant.css (not tested). 2)To remove the back ground, remove back ground from sf-menu #current and sf-menu .active in superfish.css 3)Remove background from menu li class template.css. Thanks Rupak On Thu, Sep 17, 2009 at 10:24 AM, sholland suzanna.holl...@gmail.comwrote: Thank you! Thank you! I think I have almost conquered it, but a couple things left I can't seem to overcome. 1. In IE7 the dropdown menu is going behind the image. 2. I would like to turn off the background around the home button. I have searched and searched for this and cannot seem to locate where it is being called. Any suggestions? 3. Lastly, If you look at the menu now you will notice a tiny set of blue arrows at the beginning/or end of each menu item. Again, I can't seem to find a reference to them anywhere. Thanks for taking the time out to help me. I really appreciate it. Thanks again, Suzanna On Sep 16, 1:46 am, rupak mandal rupakn...@gmail.com wrote: Drop-down menu is working, but it will no display due to overflow:hidden in clear. You have to make some changes. Add height width in tail-top-menu and remove clear class from that div. .tail-top-menu { height:30px; width:100% } and also add height in .sf-menu a sf-menu li class according to requirement ... I think this will resolve your problem. Thanks Rupak On Wed, Sep 16, 2009 at 11:04 AM, sholland suzanna.holl...@gmail.com wrote: Here aree the CSS styles being applied to that menu position by the template and by the superfish css. Thanks Suzanna ***TEMPLATE CSS* .tail-top-menu{ background:#f0f0f1 url(../images/top_menu_tail.gif) bottom left repeat-x;} ** body, td, th, div, p, label{ color:#838383; font:normal 12px/16px Arial, Helvetica, sans-serif; } a { color:#5D5D60; text-decoration:underline; } a:hover { color:#5D5D60 ; text-decoration:none } select{color:#878B8E; font-size:11px;} *** .clear{ width:100%; overflow:hidden;} *** * { padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; } * ul { list-style-type: disc; list-style-image: none; list-style-position: outside; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 15px; } .menu { margin-top: 14px; margin-right: 0pt; margin-bottom: 0px; margin-left: 31px; list-style-type: none; list-style-image: none; list-style-position: outside; padding-top: 1px; } END TEMPLATE CSS **SUPERFISH CSS .sf-menu, .sf-menu * { margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0pt; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; } .sf-menu { line-height: 1; } .sf-menu { float: left; margin-bottom: 1em; } a { color: #5d5d60; text-decoration: underline; } a:hover { color: #5d5d60; text-decoration: none; } .menu li a { color: #91caff; font-size: 13px; text-decoration: none; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 27px; } .menu li a:hover { color: #ff; text-decoration: underline; } .sf-menu, .sf-menu * { margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0pt; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; } .sf-menu a { display: block; position: relative; } .sf-menu a { border-left-width-value: 1px; border-left-style-value: solid; border-left-color-value: #ff; border-left-width-ltr-source: physical; border-left-width-rtl-source: physical; border-left-style-ltr-source: physical; border-left-style-rtl-source: physical; border-left-color-ltr-source: physical; border-left-color-rtl-source: physical; border-top-width: 1px; border-top-style: solid; border
[jQuery] Re: Getting value from fields that compose an array?
Try this var values=$('input[name=item[]]').map(function() { return $(this).val() } ).get(); Thanks Rupak On Fri, Sep 11, 2009 at 3:04 PM, ximo wallas igguan...@yahoo.com wrote: Hello! I have a form with some fields like this: input type=text name=item[] id=item[1] / input type=text name=item[] id=item[2] / input type=text name=item[] id=item[3] / input type=text name=item[] id=item[4] / How can I retriev the values with jquery? I'm using this: *** item = new Array(); for(var n = 0 ; n items_amount ; n++) { item = $(#item[n]).val(); } ** Where n is a number that comes from a bucle FOR, cuase I also know how many elements come in the array... I allways get undefined when I try to see item[] value.
[jQuery] Re: IE7 submenu display problem
hi, This is not a problem of z-index, this is due to position:relative. If you remove the position:relative absolute from #main-content, I think it will work. Thanks Rupak On Thu, Sep 10, 2009 at 2:02 AM, Sajuuk m.cube...@gmail.com wrote: I've got the same problem on a site I am working on right now. I tried setting a z-index for sub-submenus in the CSS, but it didn't have any effect. On Sep 9, 3:50 pm, theosoft ccop...@gmail.com wrote: Apparently, in IE7 and below, there is an issue with sub-submenus dropping below the submenu. I don't have any other issues with z- indexing anywhere, so I'm not sure what the problem is. Example of this error here:http://www.ciu.edu/graduate/studyoptions/ Scroll over Graduate School, and then over Study Options. Be sure to use IE7 or below. If IE8, use compatibility mode. Any thoughts on this?
[jQuery] Re: Image-Load
use $(window).load. I think it will work Thanks Rupak On Wed, Sep 9, 2009 at 3:13 PM, binarious mar...@simple-co.de wrote: Hey, I have an alert(); in a document.ready function. Sometimes the alert appears after my image on this page is loaded and sometimes it appears before. What can I do, that this javascript-part is really executed AFTER everything is loaded? Greeting from binarious
[jQuery] Re: HTML code inside script tag, how access to it with DOM???
Div is outside the HTML DOM. After creating the div element you have to append the div into the body. thanks Rupak On Wed, Sep 9, 2009 at 3:38 PM, Mariano mariano.calan...@gmail.com wrote: I have an HTML page that looks like this: html head/head body script type=text/fbml div id=testsome test/div /script /body /html Now I have the will to access to the text inside test div but the code $('#test').text(); doesn't work, matter of fact nothing is returned. If my div is dragged outside of script tag, js code return me some test correctly, but alas, div MUST be inside script. How can I solve my problem???
[jQuery] Re: Fade-in problem in IE7(urgent)
hi nick, Thanks for quick reply. That's not the problem. Here is the full code. html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js view-source:http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js/script style type=text/css media=screen .div1 { background-color:#00; width:200px; height:200px; filter:alpha(opacity=50); opacity:.5; display:none; } /style script $(document).ready(function(){ $(.div1).fadeIn(5000); }) /script /head body div class=div1/div /body /html please test this code in FF IE and you will get the diffrence. opacity remains in FF but not in IE Thanks Rupak On Tue, Sep 8, 2009 at 5:35 PM, Nick Fitzsimons n...@nickfitz.co.uk wrote: 2009/9/8 Rupak rupakn...@gmail.com: http://jsbin.com/icatu It doesn't help that your HTML is wrong: div class=div1div You aren't closing the div: you need div class=div1/div Don't know if this will fix your original problem, but it can't hurt to try :-) Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/
[jQuery] Re: Fade-in problem in IE7(urgent)
Initially div display property is set to none. FadeIn will handle display property but fadeTo will not. Any other suggestion Thanks Rupak On Tue, Sep 8, 2009 at 5:55 PM, Nick Fitzsimons n...@nickfitz.co.uk wrote: 2009/9/8 rupak mandal rupakn...@gmail.com: hi nick, Thanks for quick reply. That's not the problem. Here is the full code. It looks like jQuery's fadeIn is setting the opacity to the empty string (on IE only) at the end of the animation. You could try using fadeTo instead http://docs.jquery.com/Effects/fadeTo: $(document).ready(function(){ $(.div1).fadeTo(5000, 0.5); }) but I haven't tested that. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/
[jQuery] Re: click a button returned by ajax
Hi carlos try to use http://docs.jquery.com/Events/live thanks Rupak On Tue, Sep 8, 2009 at 8:54 PM, Carlos Santos carloeasan...@gmail.comwrote: I have a button that do appear on my page through a post with jquery: $.post( 'more_item.php',{ NumItem: NumeroItem, Str : $(#form-itens).serialize() }, function(data){ NumeroItem = new Number(NumeroItem + 1); $('#NumItem').val(NumeroItem); var htmlStr = $('#resut_itens').html(); $('#resut_itens').html(data); } ); it returns me a clickable link: a href=javascript:void(0); id=BtMoreDefeito Default / a I want to create a JQUERY that clicking this BtMoreDefeito execute a POST: $('#BtMoreDefeito').click(function(){ $.post( 'more_defeito.php',{ NumDef: NumDef, Str : $(#form-defeitos).serialize() }, function(data){ NumDef = new Number(NumDef + 1); $('#NumItem').val(NumDef); var htmlStr = $('#result_defeitos').html(); $('#result_defeitos').html(data); } ); }); but this has not worked. the latter showed that jquery is inserted in the index. the main page that calls the button. jquery in a home can act on an ID loaded from another file with ajax?
[jQuery] Re: Fade-in problem in IE7(urgent)
Thanks all ti work's. On Tue, Sep 8, 2009 at 7:44 PM, Charlie charlie...@gmail.com wrote: the fade functions use animate() I believe. Try animate function and animate your opacity rupak mandal wrote: Initially div display property is set to none. FadeIn will handle display property but fadeTo will not. Any other suggestion Thanks Rupak On Tue, Sep 8, 2009 at 5:55 PM, Nick Fitzsimons n...@nickfitz.co.ukwrote: 2009/9/8 rupak mandal rupakn...@gmail.com: hi nick, Thanks for quick reply. That's not the problem. Here is the full code. It looks like jQuery's fadeIn is setting the opacity to the empty string (on IE only) at the end of the animation. You could try using fadeTo instead http://docs.jquery.com/Effects/fadeTo: $(document).ready(function(){ $(.div1).fadeTo(5000, 0.5); }) but I haven't tested that. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/
[jQuery] Re: Hidden div height width
Thanks for the quick reply . The problem is that i cannot use visibility:hidden or position absolute. On Fri, Sep 4, 2009 at 3:42 PM, joey santiago federico.pr...@yahoo.itwrote: exactly... but if you hide it with visibility:hidden, then you still see an empty space on the page... you should hide it by setting his absolute position to top and left negative values, or (probably better?) using z-index property. hope it's useful! :) On 4 Set, 12:04, Cold Flame theumairsha...@gmail.com wrote: Hi Rupak, if div is hidden using css display:none then you can't get its height or width because logically that element is that drawn on the browser. While if u hide the div using css visibility:hidden then u can get the height and width of the element. Regards Umair Shahid On Sep 4, 3:45 pm, Rupak rupakn...@gmail.com wrote: Hi all Can any one tell me is it possible to get the height and width of a hidden div. I have to apply animation to a hidden div. But is don't know how to do this. Thanks Rupak
[jQuery] Re: Accessing Elements after adding them with Append
hi daniel, You have to bind click function after the element was append to DOM. But there is a problem Jquery support multiple binding. So you have to first unbind the click function, then append an element to the DOM and then bind click function. I think this code will help you -: $(div#categories ul li input).unbind('click',alertfunction); //append element $(div#categories ul li input).bind('click',alertfunction); function alertfunction() { alert(clicked); } Thanks Rupak On Wed, Sep 2, 2009 at 2:21 PM, Daniel battlew...@googlemail.com wrote: Hi There, I'm having trouble accessing some Elements with jQuery after I created them and added them to the HTML. I want to add some Checkboxes to my Site as soon as the user clicks another Checkbox. That works just fine. But if the user clicks on one of these added checkboxes, i want an event to trigger, too. For starters, i just want to alert a message. But this doesnt happen. Here's my code: function load(katstring) { var mykats = ''; $('div#kategorien input:checkbox:checked').each(function() { mykats += mykategorien[]= + $(this).attr('id').substr(4); }); $.post('ajaxfunctions.php', 'function=updateCategories', function (data){ var kattext = ''; kattext += 'ul'; for (index in data) { kattext += 'liinput type=checkbox name=category[] value='+data[index]+' /'+data[index]+'/li'; } kattext += '/ul'; $('div#categories div.select').html(kattext); },'json'); } $('div#categories div.select ul li input').click( function() { alert(clicked); }); So on click of the new, added checkboxes, i want to alert clicked. Nothing More. But that just won't happen. First, i figured the problem lies in just adding some html Text and not properly adding the elements to the DOM Tree. So i tried something like this: function load(katstring) { var mykats = ''; $('div#kategorien input:checkbox:checked').each(function() { mykats += mykategorien[]= + $(this).attr('id').substr(4); }); $.post('ajaxfunctions.php', 'function=updateCategories', function (data){ var cul = document.createElement('ul'); for (index in data) { var cli = document.createElement('li'); var cinput = document.createElement('input'); var ctext = document.createTextNode(data[index]); cli.appendChild(cinput); cli.appendChild(ctext); cul.appendChild(cli); } document.getElementById('categories').appendChild(cul); },'json'); } $('div#categories ul li input').click( function() { alert(clicked); }); In this Code all the Element Attributes are missing but I think you get what i was trying. ;) So, now I think the Elements are added properly to DOM tree. But still, when I click on one of the added input Elements, nothing happens. What am I doing wrong? How can i get jQuery to recognize the Elements I added? Can you please help? Thanks a lot. battlewizz
[jQuery] Re: Problems with minDate on datepicker not allowing before 1999.
hi joe, You have to specify the year range according to your requirement .By default it is yearRange: '-10:+10' Thanks Rupak On Wed, Sep 2, 2009 at 8:34 PM, hoe`` jlen...@gmail.com wrote: If I do something like, minDate: new Date(1930, 1-1, 14) or, minDate: '-70Y' The oldest date available will be 1999, and no matter what I've tried I've never been able to get beyond this barrier. Is this a limitation of datepicker? Thank you, ~Joe
[jQuery] Re: (autocomplete) Is it possible to cache the empty results ?
Hi , you have to make a little changes in autocomplete.js Search for *if (data data.length*) condition which is inside request function. Add this code before the *if * condition if(data) data.length=0; Thanks Rupak On Mon, Aug 31, 2009 at 3:36 PM, mathieuuu mathie...@gmail.com wrote: Hello, I am currently using the jquery autocomplete ($Id: jquery.autocomplete.js 5785 2008-07-12 10:37:33Z) with remote data. Obviously I did not disabled the cache and matchSubset option (all matches of foot are a subset of all matches for foo), which reduces the number of queries made to the server. This is working well except in one case : if foo returns an empty result set, continue by typing foot will still generate another query to the server ... From my point of view this shouldn't be useful (if foo doesn't return results, foot won't either) and I am looking for a way to have the same cache usage with empty result as with not-empty results. Does anyone have an idea of how this could be done or knows the reason why there is this difference of behaviour ? Thank you a lot for your help.
[jQuery] Re: Hover does not stop
hi, what I have getting is that hover function is call multiple time till the mouse pointer is inside the div area. May be you try onmouseover and onmouseout. As suggested by paolo. On Fri, Aug 28, 2009 at 4:36 PM, Paolo Chiodi chiod...@gmail.com wrote: maybe the hover is generated more than once while it is sliding. I would try to add a callback on animation end, setting tha state of the menu: open or closed. then on mouse over animate only if open, on mouse out close only if closed On Fri, Aug 28, 2009 at 12:01 PM, Mariosevenartwo...@googlemail.com wrote: Toggle works fine. But the problem now is that I always have to click and I wanted the menu ot appear and disappear onmouseover/mouseout.
[jQuery] Re: Hover does not stop
Try this $(function(){ $('#navigation').hover( function() { $(this).stop().animate({left: '-210'}, 'slow');}, function() { $(this).stop().animate({left: '0'}, 'slow');} ); }); I think that's work On Fri, Aug 28, 2009 at 5:50 PM, rupak mandal rupakn...@gmail.com wrote: hi, what I have getting is that hover function is call multiple time till the mouse pointer is inside the div area. May be you try onmouseover and onmouseout. As suggested by paolo. On Fri, Aug 28, 2009 at 4:36 PM, Paolo Chiodi chiod...@gmail.com wrote: maybe the hover is generated more than once while it is sliding. I would try to add a callback on animation end, setting tha state of the menu: open or closed. then on mouse over animate only if open, on mouse out close only if closed On Fri, Aug 28, 2009 at 12:01 PM, Mariosevenartwo...@googlemail.com wrote: Toggle works fine. But the problem now is that I always have to click and I wanted the menu ot appear and disappear onmouseover/mouseout.
[jQuery] Re: input color - default color
Hi You may try this $('#first_input').css('background-color', 'transparent'); On Fri, Aug 28, 2009 at 5:00 PM, dziobacz aaabbbcccda...@gmail.com wrote: interesting - Your solution works in Firefox and in Chrome but it doesn't work in IE 8 and Opera - in these browser background color inputs is still red - hm... strange - what should I do ? On 28 Sie, 12:59, Paolo Chiodi chiod...@gmail.com wrote: try $('#first_input').css('background-color', null) On Fri, Aug 28, 2009 at 12:23 PM, dziobaczaaabbbcccda...@gmail.com wrote: I have inputs with validationin in jquery. If data are wrong I make red background color in input: $('#first_input').css('background-color', 'red'); After click reset I would like to see default input color so I make: $('#first_input').css('background-color', 'white'); But inputs with background-cloror: white looks different than default inputs - why ?
[jQuery] Re: how to access the value of multiple textbox of same name.
thanks lanxiazhi., It works On Wed, Aug 26, 2009 at 11:24 PM, lanxiazhi lanxia...@gmail.com wrote: var values=$('input[name=location[]]').map(function() { return $(this).val() } ).get(); this will return an array of values. 2009/8/27 Rupak rupakn...@gmail.com Hi all. I have n number of text box (n may be any number) with same name. And I want to access the value of all the text box of that name. Ex-: input type=text name=location[] / input type=text name=location[] / input type=text name=location[] / or is there any other way to access the value of the text box. Either by class or any othe property Thanks Rupak
[jQuery] Re: IE Superfish z-indexing problem
Hi, This problem is due to position relative in sf-menu ul class . If you change the position to absolute i think it will work. thanks Rupak On Wed, Aug 26, 2009 at 5:17 AM, mr.amazing kenanrahm...@gmail.com wrote: I know, I know, this is a common problem. Well, after trying every combination of z-index values for all elements on my page, I decided to consult an expert on the matter, The problem can be seen here: http://traceurl.com/go/917/demo I have the RokSlideshow module installed, as you can see. I modified the js for the slideshow to stop the increasing z-index on images with no luck. I set the z-index to the items in the menu to 100 and still got nothing. Please help! Thanks, mr.amazing
[jQuery] Re: How to cancel an AJAX request?
Hi Hector, you have to use abort function. go through this link http://www.protofunc.com/scripts/jquery/ajaxManager/ Thanks Rupak On Wed, Aug 26, 2009 at 2:25 AM, Hector Virgen djvir...@gmail.com wrote: Hello, Is there a way to stop or cancel an ajax request on demand, similar to pressing stop in the browser? I would like to provide the user with a cancel button on a loading dialog that, when clicked, closes the dialog and cancels the ajax request. I have the dialog working (thanks to jQuery-UI) but pressing cancel only closes the it. I do not want simply ignore the response because I have a success callback that does some heavy manipulation of the response HTML that I'd like to prevent from running when the user cancels. Any help would be appreciated. Thanks! -- Hector
[jQuery] Re: Google Maps inside jqModal
Hi anshu you have to call initialize() function after the initialization of dialog div. Basically what's happen hear calling of google map api before the initlalization of map_canvas div. Better option is to use SettTimeout function instead of onload . $().ready(function() { $('#dialog').jqm(); setTimeout( initialize(),100) }); On Wed, Aug 5, 2009 at 12:37 AM, Anush Shetty anushshe...@gmail.com wrote: On Tue, Aug 4, 2009 at 9:23 PM, Liam Potter radioactiv...@gmail.comwrote: can you post an example? anush wrote: Has anybody tried embedding Google Maps inside jqModal ? The maps aren't getting displayed properly. $().ready(function() { $('#dialog').jqm(); }); !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xmlns:v=urn:schemas-microsoft-com:vml head meta http-equiv=content-type content=text/html; charset=utf-8/ titleGoogle Maps JavaScript API Example: Simple Map/title script src=http://maps.google.com/maps?file=apiamp;v=2amp;sensor=falseamp;key=ABQIzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA http://maps.google.com/maps?file=apiv=2sensor=falsekey=ABQIzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA type=text/javascript/script script type=text/javascript $().ready(function() { $('#dialog').jqm(); }); function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById(map_canvas)); map.setCenter(new GLatLng(37.4419, -122.1419), 13); map.setUIToDefault(); } } /script /head body onload=initialize() onunload=GUnload() div class=jqmWindow id=dialog style=width:800px a href=# class=jqmCloseClose/a div id=map_canvas style=width: 500px; height: 300px/div /div /body /html
[jQuery] Re: Superfish vertical menu, sub-menu item overlap problem
Hi BenI think the problem is off using position relative, change in css .menu li:hover { visibility: inherit; position:relative; } On Wed, Aug 5, 2009 at 3:16 AM, Ben bccar...@gmail.com wrote: In an ideal Superfish vertical menu setup, you match the width of the first ul with the offset of the second, so the menu appears directly to the right of the primary navigation. I'm looking to have that over- lap a little, and it's working fine in FF. In IE6 and IE7 the first submenu item appears on top of its parent, but each subsequent submenu item is layered beneath the primary navigation. I've tried playing with different positioning and z-index attributes, and maybe that's the solution, but I can't get it to work. Has anyone fixed this before? I've posted an example of my problem here: http://ainsworthstudios.com/example/ Help is much appreciated!
[jQuery] Re: hide() does not hide span in IE, but does in FF
hi, if you use div instead of span I think it will work. On Tue, Aug 4, 2009 at 8:25 PM, msmaeda msma...@gmail.com wrote: Hi, With the code below, I am having an issue that only seems to occur in IE. The issue is that the payer_pane span should be hidden unless the NEW option is selected in the relationship_person_id select list. In IE, the payer_pane appears despite what is selected in the relationship_person_id select list. In Firefox and Safari, the span hides and appears as expected. Thanks in advance for any help on this. Kind Regards, Matt ** JS ** // this will need tweaking when we add multiple token types, but is hard coded for now so we're aware of it. var current_person_id; var current_gateway_id; $('document').ready(function() { utilSetTextfieldHint( $('#relationship_name'), 'Enter new relationship here' ); $('#relationship_name').hide(); // set up account reference and display rules utilSetTextfieldHint( $('#new_account_reference'), 'Enter new account reference here' ); if ( $('#account_reference') ) { $('#new_account_reference').hide(); $('#account_reference').change(function() { if ($(this).val() !=0 ) { $('#new_account_reference').hide(); } else { $('#new_account_reference').show(); } }); } // populate payer information on select $('#relationship_person_id').change(function() { var person_id = $(this).val(); // existing person if (person_id0) { $('#relationship_name').hide(); load_payer(person_id); } // new person else { $('#relationship_name').show(); populate_payer_person(); populate_payment_token(); } if ( person_id == $('input[name=person_id]').val() ) { $('#payer_pane').hide(); } else { $('#payer_pane').show(); } }); $('#payer_pane').hide(); }); function populate_payer_person(data) { if (!data) { data={}; } if (data.error) { if ( confirm(Error: +data.error+ - Retry?) ) { load_payer(current_person_id); } } else { $('input[name=payer_person_id]').val(data.id||''); $('input[name=payer_person_first_name]').val(data.first_name||''); $('input[name=payer_person_middle_name]').val(data.middle_name||''); $('input[name=payer_person_last_name]').val(data.last_name||''); $('input[name=payer_person_address1]').val(data.address1||''); $('input[name=payer_person_address2]').val(data.address2||''); $('input[name=payer_person_city]').val(data.city||''); $('input[name=payer_person_state]').val(data.state||''); $('input[name=payer_person_zip]').val(data.zip||''); $('input[name=payer_person_zipplus4]').val(data.zipplus4||''); $('input[name=payer_person_phone1_number]').val (data.phone1_number||''); $('select[name=payer_person_phone1_description]').val (data.phone1_description||''); $('input[name=payer_person_phone2_number]').val (data.phone2_number||''); $('select[name=payer_person_phone2_description]').val (data.phone2_description||''); } } function load_payer(person_id) { // grab payer info from server through ajax and populate into form current_person_id = person_id; populate_payer_person({ first_name: 'Loading...'}); $.getJSON( '../../app/charge', { m: 'ajax_person', person_id: person_id }, function(data) { populate_payer_person(data) } ); } ** HTML ** h1Account Info/h1 form action=../../app/charge method=post id=cc_form input name=m value=select_credit_card type=hidden/ table tr valign=top td width=48% Account Numberbr/ br/ Client/Directory Locationbr/ br/nbsp; /td td width=4% rowspan=2nbsp;/td td width=48% Payer's relationship to the Account Holderbr/ select style=width: 200px; class=input1 id=relationship_person_id name=relationship_person_id option value=3SELF/option option value=0NEW/option /selectbr/ input style=display: none; id=relationship_name name=relationship_name size=30 maxlength=30 class=input1 grayed type=text /td /tr tr valign=top td style=background-color: #d9d9db;padding: 4px; bAccount Holder/bbr/ ... /td td span id=payer_pane bPayer Information/bbr/ table ... /table /span /td /tr tr td colspan=3 align=rightbr/input class=button1 type=submit id=submit_transaction value=Next/br/br/br// td /tr /table /form
[jQuery] Re: Superfish z-index problem with googlemap in IE
Thanks for the suggestion.I got the solution.We have to just change the superfish.css .sf-menu li:hover { visibility: inherit; /* fixes IE7 'sticky bug' */ position:relative; z-index:999; } and it will work. On Mon, Aug 3, 2009 at 11:38 AM, CanisVoriCanis code.l...@gmail.com wrote: I just had a similar problem and my here is my solution. first some html div idcontainer div id=menumenu.../div div id=map_container/div /div You must set all of the div tags two properties of position and z- index, ie. { position:relative; z-index:; } You can set other style properties but you must set those two. If you remove either one it will not work. Then make sure your menu z-index exceeds your container AND map_container. Then (THIS IS NOT INTUITIVE) your container should exceed your map_container. I have mine set as follows container z-index = menu z-index = 99 map_container z-index = 1 Good luck I hope this helps your particular case. On Jul 31, 6:06 am, appu rupakn...@gmail.com wrote: Hi All I am using the superfish menu on a page that also has a google map on it. It work fine in FF but the menu will display below the google map in IE. I have already change the z-index:999 and position:absolute, but the result remains same for IE. Thanks in advance for your help
[jQuery] Re: Check if element is shown with show()
Hi Stefan What i am getting is that, on click you have to display a paragraph and hide another. lia href= id=home class=changepara Home/a/li lia href= id=about class=changeparaAbout/a/li lia href= id=contact class=changeparaContact/a/li lia href= id=gallery class=changeparaGallery/a/li $(.changepara).click(function(){$(.hangepara).hide(); $(#+this.id).show(); }) }) I think this code will help you. On Tue, Aug 4, 2009 at 5:29 AM, StefanCandan onlyo...@live.nl wrote: Hello, I'm building a website with JQuery. Now I need to check if an object is shown, with show() My jqeury to hide all the elements at start: $(p.about).hide(); $(p.gallery).hide(); $(p.links).hide(); $(p.contact).hide(); $(p.home).hide(); Then I show the p.home once the page finishes loading. Then when clicked on a link, the shown p element should be hidden with the hide() command, and another p element should be shown. so like: lia href=Home/a/li lia href=About/a/li p class=homeWelcome/p !-- Shown at start !-- p class=aboutAbout me/p !-- Hidden at start !-- so when about is clicked, p class=home should be hidden, using the hide(slow); and p class=about should be shown using the show(slow); Any ideas on how I can do this?
[jQuery] Re: Superfish z-index problem with googlemap in IE
Thanks for the responce. On Sat, Aug 1, 2009 at 7:36 PM, Boris Anthony boris.anth...@gmail.comwrote: Having the same problem. From what I can gather, Superfish in IE7 goes behind any element that has position:relative; declared, and it just so happens that embedded Google maps seem to require it's container to declare that explictly. I can't provide a demo right now (about jump on a plane) but if no one elsee knocks one up, I could try tomorrow. Thanks B. On Jul 31, 8:38 am, amuhlou amysch...@gmail.com wrote: can you post a link to an example page where this is happening? thanks On Jul 31, 8:06 am, appu rupakn...@gmail.com wrote: Hi All I am using thesuperfishmenu on a page that also has agooglemapon it. It work fine in FF but the menu will display below the google mapin IE. I have already change the z-index:999 and position:absolute, but the result remains same for IE. Thanks in advance for your help
[jQuery] Re: Does IE support live?
hi David, you have to bind jump in load callback function. $(function() { $.ajaxSetup({ cache: false }); $('#btn').click(function() { $('div:first').load('b.html',function(){loadCallback();}); }); }); function loadCallback() { $('#jump').live('change', function() { alert(1); }); } I think this will fulfill your requirement . On Fri, Jul 31, 2009 at 12:28 PM, David .Wu chan1...@gmail.com wrote: If I load b.html in firefox, alert(1) will work, but ont work in IE. page a.html !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titlelive/title script type=text/javascript src=js/jquery-1.3.2.min.js/script /head body div style=width: 300px; height: 300px; border: 1px solid red;/ div input type=button id=btn value=btn / script $(function() { $.ajaxSetup({ cache: false }); $('#btn').click(function() { $('div:first').load('b.html'); }); $('#jump').live('change', function() { alert(1); }); }); /script /body /html page b.html select id=jump option value=11/option option value=22/option /select
[jQuery] Re: call ajax on ENTER key press
Hi bharani I think this code will work for you $(document).ready(function() { $('#movie_name').keyup(function(e) { if(e.keyCode == 13) { //your code } }) }) On Fri, Jul 31, 2009 at 9:44 AM, Mohd.Tareq tareq.m...@gmail.com wrote: Hi bharani kumar, * * *Its simple one you need to write onKeyPress event in the method definition read key value if * *key value is equals to 13 then post ur form.* cheers :) On Fri, Jul 31, 2009 at 9:26 AM, bharani kumar bharanikumariyer...@gmail.com wrote: Hi all input type=text name=movie_name id=movie_name / This is my autosuggest field , when the filed is filled with values then user trying to post application using ENTER key , But i written code for onclick only , now tell me , How to submit value , When the ENTER Key pressed , Thanks Regard Mohd.Tareque
[jQuery] Re: Is it possible to hide the destination URL of a link?
Hi anoop I think you can store the required data in session. On Fri, Jul 31, 2009 at 5:19 AM, Anoop kumar V anoopkum...@gmail.comwrote: I have a menu, on which is a delete link. The URL of the link is quite plain: http://mysite.com?delete=trueid=123 (quite obvious I think that the request is to delete the id=123) I wish to hide the destination URL in the browser from the user - so that it shows a harmless url like: http://mysite.com?# or similar. The reasons are more aesthetic than anything else. Also the other advantage is once the user clicks on the link, and then hits on refresh, the request gets posted again and because the id=123 has already been deleted, it will just generate an error.. Does that make sense? I dont mind using ajax for this - but would love if I could get both options - ajax and non-ajax. Thanks, Anoop
[jQuery] Re: Is it possible to hide the destination URL of a link?
you can also use form submit. onclick event you can reset the value of form element and submit the form. On Fri, Jul 31, 2009 at 11:02 AM, Anoop kumar V anoopkum...@gmail.comwrote: Yes - but I would not know the id until the user clicks on the link. There are about 20 other links, each has an id. The user can hover on any link, a pop up appears with the Delete link, clicking on it will call a URL which is basically the same page (it is a jsp page) which see that the parameter delete=true and based on that it knows that this is a delete request and the id to delete is also passed to it. To some extent I have figured out a way to hide the url. below is the jquery code: I have bound the click event to the a element var target = $(event.target); if($(target).is(a)) { if ($(target).text() == Delete) { var reg = $(this).find('.details input:first').val(); $.get(window.location + ?delete=trueid= + reg); } } The problem I am facing now is that sometimes the page updates itself to show the id that was deleted and sometimes even though the id was deleted, the page does not reflect the deletion until the page is refreshed using F5. Also I thought the $.get would be an async ajax request, but it seems the whole page is hard refreshed (even though it seems useless because the id deleted is still shown on the page, again - goes away after the manual F5). I have just tried a lot of things using .load in the success, .ajax, .post etc etc, but I have the same issue. Thanks, Anoop On Fri, Jul 31, 2009 at 1:20 AM, rupak mandal rupakn...@gmail.com wrote: Hi anoop I think you can store the required data in session. On Fri, Jul 31, 2009 at 5:19 AM, Anoop kumar V anoopkum...@gmail.comwrote: I have a menu, on which is a delete link. The URL of the link is quite plain: http://mysite.com?delete=trueid=123 (quite obvious I think that the request is to delete the id=123) I wish to hide the destination URL in the browser from the user - so that it shows a harmless url like: http://mysite.com?# or similar. The reasons are more aesthetic than anything else. Also the other advantage is once the user clicks on the link, and then hits on refresh, the request gets posted again and because the id=123 has already been deleted, it will just generate an error.. Does that make sense? I dont mind using ajax for this - but would love if I could get both options - ajax and non-ajax. Thanks, Anoop
[jQuery] Re: Draggable problem
Hi , replace the javascript cod and add dragafter class in css //javascript $(document).ready(function(){ //Counter counter = 1 //Make element draggable $(#drag).draggable({ helper:'clone', start: function(e, ui){ $(ui.helper).addClass(ui-draggable-helperMoving); }, stop:function(ev, ui) { $(ui.helper).addClass(ui-draggable-helperStoped); var pos=$(ui.helper).offset(); $(#clonediv+counter).css({left:pos.left,top:pos.top}); counter++; ui.helper.draggable({ stop:function(ev, ui) { console.log($(ui.draggable).attr(id)); } }); } }); //Make element droppable $(#frame).droppable({ drop: function(ev, ui) { var element=$(ui.draggable).clone(); element.addClass(tempclass); $(this).append(element); $(.tempclass).attr(id,clonediv+counter); $(#clonediv+counter).removeClass(tempclass); $(#clonediv+counter).addClass(dragafter); } }); }); //css .dragafter{ position:absolute; } I think it will fulfill the requirement of your problem On Tue, Jul 28, 2009 at 8:56 PM, Marcos Placona marcos.plac...@gmail.comwrote: Hi, I'm working with draggable, and basically what I'm trying to accomplish is having one item on my screen, that can be dragged anywhere, and uses helper:'clone', so it still sticks to its main location and can be cloned N times. It all looks good, but I just realized that although cloning is possible, it always keep the same ID. Also, when I drag it from one side to another it never stays where I dropped it, but stacks up on the left hand side. I've put up a quick example, so you can understand what I'm doing. The idea is move the red spots from the left to the right, but they have to where they were dropped and have their own ID's. http://sandbox-placona.appspot.com/places.html Any help is appreciated Thanks, Marcos Placona http://www.placona.co.uk/blog
[jQuery] Re: Draggable problem
Hi markos, i think that the style of the div is attached to its id (#drag) that's why it will disappear after dragging. Just attach the style by class name. or replace the html file. On Wed, Jul 29, 2009 at 2:49 PM, Marcos Placona marcos.plac...@gmail.comwrote: Hi Rupak, thank you very much for that,Although I did exactly what you said, it still doesn't work very well. It does create new items and gives them ids and everything, but the items simply don't stick to the location, and simply disappear. Here's how it is now: http://sandbox-placona.appspot.com/demo.html I've also changed the style as you suggested. Can you help me a bit more with this? Thanks On Jul 29, 7:21 am, rupak mandal rupakn...@gmail.com wrote: Hi , replace the javascript cod and add dragafter class in css //javascript $(document).ready(function(){ //Counter counter = 1 //Make element draggable $(#drag).draggable({ helper:'clone', start: function(e, ui){ $(ui.helper).addClass(ui-draggable-helperMoving); }, stop:function(ev, ui) { $(ui.helper).addClass(ui-draggable-helperStoped); var pos=$(ui.helper).offset(); $(#clonediv+counter).css({left:pos.left,top:pos.top}); counter++; ui.helper.draggable({ stop:function(ev, ui) { console.log($(ui.draggable).attr(id)); } }); } }); //Make element droppable $(#frame).droppable({ drop: function(ev, ui) { var element=$(ui.draggable).clone(); element.addClass(tempclass); $(this).append(element); $(.tempclass).attr(id,clonediv+counter); $(#clonediv+counter).removeClass(tempclass); $(#clonediv+counter).addClass(dragafter); } }); }); //css .dragafter{ position:absolute; } I think it will fulfill the requirement of your problem On Tue, Jul 28, 2009 at 8:56 PM, Marcos Placona marcos.plac...@gmail.comwrote: Hi, I'm working with draggable, and basically what I'm trying to accomplish is having one item on my screen, that can be dragged anywhere, and uses helper:'clone', so it still sticks to its main location and can be cloned N times. It all looks good, but I just realized that although cloning is possible, it always keep the same ID. Also, when I drag it from one side to another it never stays where I dropped it, but stacks up on the left hand side. I've put up a quick example, so you can understand what I'm doing. The idea is move the red spots from the left to the right, but they have to where they were dropped and have their own ID's. http://sandbox-placona.appspot.com/places.html Any help is appreciated Thanks, Marcos Placona http://www.placona.co.uk/blog Title: Where have I been? - Demo
[jQuery] Re: Tabs: page jumps to top when tab changes
Hi, if you remove the jquery.history_remote.pack.js then I think it works properly. On Wed, Jul 29, 2009 at 5:50 PM, chris_huh chris@gmail.com wrote: At the moment my page will jump to the top (because of the #) whenever a new tab is clicked or when it automatically rotates to one. Is there a way to stop this, maybe using an onclick event instead of relying on the #tabs links?
[jQuery] Re: Autocomplete cache problem ( Urgent )
Hi , you have to make a little changes in autocomplete.js Search for *if (data data.length*) condition which is inside request function. Add this code before the *if * condition if(data) data.length=0; On Tue, Jul 28, 2009 at 1:29 PM, Vivek narula.vi...@gmail.com wrote: Hi, I am using autocomplete plugin. I have one Search field upon which i have put the autocomplete and other a select box which have 3-4 values such as Vidoes, audios, images etc..., I am using Extrafield option to pass the select box's value to the PHP Script. It is working fine however i am having one problem. IF i select vidoes in the select box and enter a it autocompletes and shows the results from the database. if i add b to it therefore the search keyword becomes ab it works fine. Now at this stage if i change Videos to Audios in the dropdown and remove b from the search keyword therefore the search keywords becomes a with select box having Audio, It shows the same results that it was showing for the Videos select box. I have seen (with Firebug) there no Ajax Calls happens. So it seems that it is using cache. I tried to use flushCache function of autocomplete however it did not works. Below is the code i am using. jQuery(document).ready(function (){ jQuery(#searchfield).autocomplete(autosearch.php, { width:150, autoFill:false, matchContains: true, extraParams: { searchtype: function (){return jQuery('#searchtype').val();} }, selectFirst: false }).flushCache(); }); Please suggest me any solution for it. Thanks