I use .load, but it prevents me from setting css color on what is loaded.
I have code that lets the user click on a link. When he does that, it calls the .Load function. This loads some HTML (a div and some contents) into a tag. Then it tries to color the left border of the DIV that it loaded. Now the interesting thing is that it does succeed to color that border very briefly - but immediately the color is covered up with black, which is the original color. When it sets the color, it uses the statement: $("DIV.ContainerPanel > DIV.wrapContent").css('border-left-color',
load() function is not working with datepicker input
Hi! I have an input text in which i use datepicker. When i select a date from the datepicker it doesn't work, but when i type the date manually data are loaded correctly. <input type="text" id="date_facture" class="required text fl-space2 datepicker-inline" name="date_facture" /> <script> $(function() { $("#date_facture").change(function() { $("#loaded_facture").load("./_num_facture.php?choice=" + escape($("#date_facture").val())); }); }); </script> Does anyone know how to fix that?! Thanks
Why does setting css to "float:left" make the div shrink to a narrow width?
I am having a problem with .css('float' , 'left'); Let me give you some background:I looked at the coda-slider plugin, which slides panels across the screen. I thought a nice effect would be to slide the entire screen, not just a panel in the screen. So I looked at the HTML for the coda-slider, and it demands several nested DIVs. The innermost Div is of class ".panel". I saw that these DIVs all had widths set to something in the css, so I got rid of all those widths (given that I want the entire
I've problem with hide element in jquery.
Hi! I'm new to JQuery and My problem is js code works fine in ff, opera but not in ie $("*#title").click(function () { if ($(this).parent().find("#r_content").css('display')=='none') $(this).parent().find("#r_content").show("slow"); else $(this).parent().find("#r_content").hide("slow"); });Html is <div id="art_box"> <div id="article"> <div id="title"></div> <div id="r_content"><p>Some text1</p></div> </div> <div id="article"> <div id="title"></div> <div id="r_content"><p>Some
TextArea in UL doesn't take spacebars?
Hello! I have a problem with JQuery Mobile and I can't figure out what's wrong. For some reason, form elements inside a UL with the data-role "listview" will not accept spacebars - nothing happens when I push it. Taking out data-role="listview" allows spacebars to be typed again. It seems this occurs on multiple kinds of text areas. Any ideas? Ex: (Edited to add complete barebones test page, with template copied direct from docs, and form elements added with as minimal specificity as possible) <!DOCTYPE
Animating my list-item
I have an unordered list as shown below and i am trying to make the list rotate. The script below rotates the list but only does it only when clicked on. However, is it possible to do this automatically, without the user having to click, if yes, how please? <ul> <li>menu1</li> <li>menu2</li> <li>menu3</li> <li>menu4</li> <li>menu5</li> </ul> <script> $(function() { $("li").click(function() { var prev = $(this).prevAll(); $.unique(prev).each(function(i) {
Struggling with the css.class & ajax.call~~PLZ help!
I'm very new for jquery & js, so I'd like to be someone like u guys, so there's the question: I have a menu list (four h5s) to call 4 pages for each h5. I want the h5 clicked to get a current class when its call is completed, and the previous one come back to be with a link class, and the page called in the container. Now I got the code: HTML <div> <h5 id='menu' onclick=changeDivClass(this.id,0,1)>Menu1</h5> <h5 id='menu' onclick=changeDivClass(this.id,1,1)>Menu2</h5> <h5 id='menu' onclick=changeDivClass(this.id,2,1)>Menu3</h5>
Callback Parameters
Hi I want to understand the callback syntax and pass the id of the html element as any parameter here is my requirement In my callback, I am passing the load(url..) I want the URL to be dynamic, based on the URL = BaseURL #callingID , where #callingID is the ID of the calling HTML element. This way I have to write just one callback function and can reuse this to load multiple sections based on where it is coming from. Thanks Rajesh $('#callback').bind('pageAnimationEnd', function(e,
A couple of quick styling questions for the mobile realm
Page transitions: How do we eliminate the "loading" between pages message.. and how would you make the transitions happen midpage without having to scroll all the way to the top to have the transitional effect? It looks jerky in any emulator and on my phone.
function context/scope issue
In my widget I have an instance of UI dialog with button OK which triggers "onOk" event in my widget. Before triggering my event I set a flag "inProgess" to prevent multiple callbacks. And there lies my problem. When i try to call "succededFunction" argument in function attached to onOk event: function InfoOk(ev, args) { args.succededFunction(); //setTimeout(args.succededFunction, 1); } It provides (a copy of?) my widget in context but without attached flag and original
DateTime Picker Help!
Hey guys, I've got a modified date-time picker.. I've added a time picker to date picker.. I got a question/problem.. I've done everything i can but i couldn't change the day which is the first time of the week.. Weeks start with Sunday defaultly but in my country(TURKEY) it's starting with Monday.. Is there anybody know how to change that? Demonstration: http://onur.ws/date2 thanx.
Please suggest appropriate JavaScript-emulated scrollbar
Hello, I am developing an app that has reporting engine in it. It might generate reports, basically HTML tables, containing several thousand rows. Right now the engine features classic paging control: buttons 20 nearest page links, jump-to-page, previous/next page. I'd like to replace this cumbersome paging with a scrollbar. Thing is, I don't want to generate and stream to the user all the thousands of rows, but want to implement a smart updating mechanism, that would make the user feel as the content
jquery validation questions
Very nice jquery plugin, that jquery.validation from bassistance.de, but have a questions. In my form i have add 2 field called phone number and mobile number. I want check when 1 of these fields are filled. If both field are not filled, people get a error. So people must fill a phone or mobile number. How can i solve it? Greetings,
Adding draggable elements not working with XMLHttpRequest()
Heya all, I am adding some new div's elements threw XMLHttpRequest(). My div's are draggable in my HTML document using jquery and the draggable option is assigned to the class. All the new div's generated with my XMLHttpRequest() are not. I know that the links are good with the new div's since they are taking all the CSS assigned to the class. Is there any reasons why? Thanks in advance!
Horizontal scrollbar with the jquery ui accordion
Hi I hope you can help. I have a horizontal scrollbar added to my web page with the JqueryUI Accordion plugin (latest release). Its occurs in all browsers; a horizontal scrollbar for no apparent reason. Take a look here: http://punctu8.co.za/services.html Please help. Thanks
Using the .load() in IE 7
I have a web page in which I'm trying to create a tool-tip that pops up when you roll over a glossary term. The tool-tip then populates from the external 'glossary.html' page. Works great in IE8 and FF. But IE 7 continues to be the thorn in my side. On the main web page I use an 'a' tag for the term. This is the one that a tool-tip appears over: <a class="gloss" anchor="lorem_ipsum">Lorem ipsum</a>Then another web pages has a table that holds the glossary. This is a full web page with the html head
Cycle Plugin: Creating anchors
Hi, I want to have two links within one div to lead to the next slide. Script: $('#slideshowProduction').before('<div id="horNav" class="horNav">').cycle({ fx: 'scrollHorz', cssBefore: { opacity: 0 }, animOut: { opacity: 0 }, animIn: { opacity: 1 }, timeout: 0, easeIn: "easeInOutExpo", pager: '#horNavPrevNext', pagerAnchorBuilder: function(idx, slide) { // return sel string for existing anchor return '#horNavPrevNext li:eq(' + (idx) + ') a';
jQuery conflict,,
Hello guys! I need help.. i think the 2 .JS file is conflicting each other.. Everytime i go to the gallery of our community site (http://www.tapoutguild.com/) there's a pop up windows saying Error.. and the Sooka chat refreshes like constantly. Here's the .JS code on the Sookachat http://cdn.sookachat.com/public/js/loader.pack.js var sk_Loader=function(){var f=document,e=null,a=[],c;function b(){if(c){return}var g=navigator.userAgent,d;c={gecko:0,ie:0,webkit:0};d=g.match(/AppleWebKit\/(\S*)/);if(d&&d[1]){c.webkit=parseFloat(d[1])}else{d=g.match(/MSIE\s([^;]*)/);if(d&&d[1]){c.ie=parseFloat(d[1])}else{if((/Gecko\/(\S*)/).test(g)){c.gecko=1;d=g.match(/rv:([^\s\)]*)/);if(d&&d[1]){c.gecko=parseFloat(d[1])}}}}}return{load:function(l,m,k,j){var
jQuery XML find first node Attribute by nodename
Hi I have an XML feed which has duplicate media:thumbnail child nodes for item <item> <title>Taylor's trial 'neo-colonialist'</title> <description>The lawyer for Liberia's ex-President Charles Taylor says the prosecution has turned the war crimes trial into a "21st Century form of neo-colonialism".</description> <link>http://www.bbc.co.uk/go/rss/int/news/-/news/world-africa-12685938</link> <guid isPermaLink="false">http://www.bbc.co.uk/news/world-africa-12685938</guid> <pubDate>Wed, 09 Mar 2011 13:12:32
validating radio buttons with jquery but not when hidden
I have a page with two tables. The first is visible and the second is hidden when the page loads. If the last two items (in color) in the first table have either "Yes" choice selected, then the second table appears. I need to add validation to make sure all visible items are selected before the form submits. The problem I'm having is that if the second table is hidden (because "No" is selected for last two items in first table), the form should submit the data from the first table because the second
The suggestions are covered by the next frame (jQuery ui autoComplete V1.8.10)
There are several frames in my page, and i use the jquery ui autocomplete(V1.8.10) in the top frame.What I'm confused about is that the suggestions are partly covered by the next frame,but I could not turn the narrow top frame to a big one.So, is there anything I could do to fix the problem? Thanks very much for your suggestions.
Can't make addClass work
I have html code: <div id="dropdown" class="rMenu"> <ul id="middlemenu" class="rMenu-hor rMenu"> <li><a href="page.html">Page</a></li> <li><a href="page1.html">Page1</a></li> <li><a href="page2.html">Page 2</a> <ul class="rMenu-ver "> <li><a href="page3.html">Page 3</a></li> </ul> </li> </ul> </div> <script type="text/javascript"> $(document).ready(function(){
pass dimensions to jQuery mouse functions instead of HTML Element
I'm developing an image slider. I'd like to be able to trigger functions when the mouse leaves an area, sort of like $('#someDiv').mouseout or $('#someDiv').mouseleave except instead of passing the div to the function I have a dimension I'd like to pass to it. I have box like so: --------------- 400 px ------------ ______________________ 3 | | 0 | | 0 | | p |
Calling functions
Hi, I'm super new at jquery and seem to be having a lot of problems understanding the syntax. How do I call a predefined function? It seems like it should be super simple, but it doesn't seem to work. If I embed the function in the handler call, it works fine, but I when I try to call it from there, it doesn't work. Am I missing something? $(document).ready(runthis()); Assuming that function runthis() is already a defined function, is this improper syntax? Thanks!
Adding Form Icons
I have a four panel registration form with four text boxes each and I have created the PHP authentication class which I can call with ajax and it works great. But I can't seem to get a handle on the validation icons. Here's the jFiddle: http://jsfiddle.net/uR4Jv/ When you focus on a text box it changes all four icons, how do I only change the icon on that row? I tried using next() and that didn't work, and since this is part of a four panel registration form I don't want to use #id and have repetitive
undelegate namespaced events
I noticed that undelegate doesn't seem to work with a custom namespaced event. If you undelegate('selector', '.namespace') it doesn't work, but if you unbind('.namespace') that same thing, it does. Here's a fiddle that explains what I expected http://jsfiddle.net/matthewlein/7LRmR/ seems like something useful for plugins or widgets that want to delegate.
load function works once only
I've gotten this code to work the first time that the user changes the select option: $('select.third, select.fourth').change(function(event){ var id = $(this).siblings('.hidden').text(), token = $('#token').val(); param = $(this).hasClass('third') ? 'isSold' : 'isActive'; value = $(this).val(); $('div#allSheepDisplay').contents().remove().end().load( 'db-interaction/animals.php', { action: 'update', id: id, token: token, param: param, value: value }, function() { $('select.third').filter(function(){return
(Datepicker) Working on displaying an icon on a particular date, should I just use a different plugin?
Proof Of Concept: http://jsfiddle.net/fauxtrot/Bdetb/ I like the look of the datepicker for jQuery UI, so I'm trying to use it here. I wanted to display a calendar with icons on particular days. In my fiddle, I have it basically working. I can't quite figure out how to prevent the datepicker code from resetting the ui-state classing when it is selected, and subsequently deselected. Am I asking too much of the datepicker, or is this something done easily enough with the current code or different
displaying json data
i am a newbie and am stuck at retrieving json data. following is my index.php : <script type="text/javascript" src="jquery-1.3.2.min_2.js"> $("document").ready(function() { $.getJSON("data.php",function(jsondata){ $("#content").html(jsondata[0].content); }); }); </script> </head> <body> <div id="content"></div> <div class="lg"></div> </body> in my data.php i am using the standard way of encoding and sending the data: echo json_encode($jsondata);
exception thrown and not caught in most recent jquery min
Not sure how much this can actually influence anything, I'm getting a warning message from internet explorer's javascript debugger for jquery.min.js (I load the most recent version from Google's CDN): Error details Web page User agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) Timestamp: Sun, 6 Mar 2011 14:40:13 UTC Message: Exception thrown and not caught Line:
Why doesn't JQuery Mobile change to the proper URL (nav bar) when clicking on exernal links?
Hi everyone - I just noticed that when I'm navigating around my app, the URL doesn't seem to change. Specifically, I start on a page, default.aspx. I've got some UL listview links. I click on a link, for instance, "product_list.aspx". The page renders with the list of products, however the URL in the Navigation Bar stays as /default.aspx!!! Since I'm using .NET, this causes all sorts of havoc when I try to click on "pager" links (they do a postback to the local page, however, they think the
$.mobile.changePage not working in phonegap
I have found that the $.mobile.changePage("about/us.html", "slideup"); function does not work with phonegap. Any ideas on a workaround?
Form submit from dialog page
Hi there I'm new to jQM and love it so far, I think it's much better than Alpha right now :) However, I ran into an error now that I can't find a solution on the web and I think my code is about right. I open a dialog using a link: <a href="city.php" data-role="button" data-rel="dialog" data-transition="pop">open my dialog...</a>Then on the dialog I have a form, the whole city.php looks like this: <div data-role="page" data-theme="a" id="cityPage"> <div data-role="header"> <h1>headertext</h1>
Remove ajaxComplete handler
Hi, I am setting a $("body").ajaxComplete(...) handler to monitor all ajax calls. I haven't figured out how to remove the event as the handler can possibly stopped and restarted a few times, and I don't want to have multiple handlers in the background for performance reasons. I've tried saving the handler in a variable var x=$("body").ajaxComplete(...) ... x.remove() but no success. Is there any way? Thanks and best regards Eike
How to change pageloading() text and color?
Hi, I have tried to find the css to change the font color on pageloading page. It works. But i cannot change the "loading" text. Anybody know what the code is to change the default "loading" text? Thanks!
data-rel="dialog" problem
how do i add data-rel="dialog" to a url that is being redirected or how can data-rel="dialog" take place on load or via url string. i'm looking specifically for use in Wordpress' 'wp_redirect()' function but any help would be great i have a form in a dialog box and I want the dialog to maintaing w/ the thank you message after submitting form. however, a new page comes up and removes the dialog box. how can i fix? the thank you message is sent as a redirect
Autocomplete Dropping 'at' @ Sign in Email Addresses
My applicaiton uses jQuery autocomplete and I noticed that when I type an email address (e.g. someone@somewhere.com) the autocomplete feature works up until I type in the "at" sign. As soon as I enter the @, the autocomplete stops working and the autocomplete suggestion box disappears. When I looked into the issue further, I realized that the string from my input field that is passed along to my autocomplete look-up script is being cut off at the @ sign. In other words, I can type in someone@so
this.each needed for *every* plugin?
Hi Apologies if this question is a little basic... The standard pattern for plugin development seems to involve this.each(function(){...plugin code...})in order that each element in the jQuery collection may be operated on. In this net.tutsplus tutorial this pattern is used, but within the loop, elements with IDs are created. (I think I've seen this elsewhere). Is there not a contradiction here? A follow-on question is, if you a have a situation where it only makes sense for your plugin to be called
Can't get to nested table
Hi everyone, I develop pages within a third party web application. The page output has tables within tables. I have an 'id' for the table I want, 'oErrorsList' which I then want to find the value of 'SelectedRowID'. I have tried the following code but I get nothing. var myTable.text = $('table').filter('[id=oErrorsList]').SelectedRowID; alert(myTable);I am new to this forum and I don't know if this is enough information so I am including an image of part of the page. Thanks very much for any help
Progress bar not updating with Chrome, Safari (webkit) - help!!??
Hi, I am fairly new to all of this, so please pardon my ignorance. I have a simple problem that I cannot figure out. I want to set up a progress dialog that will show the progress as I write a bunch of things to my database. I set up the progress bar, and then enter a for loop to start adding records to the database. After the record is written, I update the progress bar. When everything is done, I close the progress bar. This all works fine in Firefox, but on the webkit browsers, the dialog never
Next Page