Validate, custom regular expression?
Does anyone know if it is possible to use your own regular expression for fields with the JQuery Validation plugin? I have previously used Live Validation (standalone) which allows you to do this kind of thing: var loginpass = new LiveValidation('loginpass'); loginpass.add( Validate.Format, { pattern: /^[A-Za-z\d]+$/i } );
[jQuery] tablesorter 2.0 - Shiny Brand new documentation!
Hi List, After many late night i have managed to sort out a documentation/FAQ, for the new 2.0 release. I hope to have included the most common questions/problems + showing off the new features, but i might have missed some, so any feedback on this would be great! The new documentation is located here: <a href="http://lovepeacenukes.com/tablesorter/2.0/docs/">http://lovepeacenukes.com/tablesorter/2.0/docs/</a> The new tablesorter will be released next week.<br clear="all"> Best regards Christian
[jQuery] Select third column of the table
Dear all, If I want to select the 3rd column of the table, (e.g. 3 rows) $("tr > td:eq(2)") would returns only one <td>. $("tr").find("td:eq(2)") would returns 3 <td>. Is that ":eq(2)" is applied to the whole "tr>td" set? Is that correct?<br clear="all"> -- Best Regards, Jacky 網絡暴民 <a href="http://jacky.seezone.net">http://jacky.seezone.net</a> _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Newbie question: how to play my animation in reverse upon second click
Hey ya'll, I'm slowly learning jQuery and starting to have some fun with it. I've set up an animation where if you click a certain anchor the animation plays. However, being new at this, I cannot figure out how to play the animation in reverse if the same anchor is clicked a second time. Here is an example of my sloppy script: <script> $("#animate").click(function(){ $(".box1, .box2, .box3, .box4").animate({ height: "98px", opacity: 1, marginTop: "109px", border: "1px solid #666", }, 200 ); });
[jQuery] IE: load()-related memory leak?
Greetings, I am using jQuery in AJAX-based Web-application that uses load() to update contents of (a part of) a Web page, through sequences like $("#pagepart").empty(); $("#pagepart").load(url, {}, afterload); The problem is that in IE a strange problem was detected: every time the above sequence is called, memory used by IE grows. No such effects either in Opera or in Firefox. Is this a known problem with IE? IE version: 6.0.3790.3959, jQuery - the latest (1.2.1). Thank you. With all respect, Konstantin
<textarea> and ajax with serialize()...HELP
I'm using ajax to process a form. But my form has textareas in them. Its not passing the textarea values. Here is my javascript code: $.get( "process_order.php", $("#order").serialize(), function(data){ $('#loader').hide(); if(data) { pTag = "<img src='http://www.heartofgold-usa.com/images/saved.png' width='200px'><br />Order Saved"; $('#popup').empty(); jQuery("#popup").append(pTag);
[jQuery] how to catch a scroll event for the document ...
i tried: $j('body').scroll( function() { console.info ('scrolling ...'); // do sth }); but it doesn't work ... Maybe the selector is wrong, but what is the correctr one ? micha
How do I hide only half of a div and then reveal it on hover?
Hi guys, I'm rather new to jQuery, so please just humor me. If I'm in the wrong section, could someone point me in the right direction? Anyhow, as per my new site design, I need to have a DIV on the page, containing an image, some other divs, and some text within it, but have HALF of it concealed (see attached spotslideprev1.jpg) until the user hovers over the div, revealing the complete DIV (see attached spotslideprev2.jpg). I think it's pretty self explanatory. If anyone has any ideas or tips,
How to select all descendants of a div
I'm very new at jQuery and I am trying to write a selector that returns a div with a particular id and all its descendants. What I have is $('.boxBody > div:eq(' + $('#tabMenu > li').index(this) + ')').contents().andSelf().slideDown('1500'); The problem is that the slideDown sets style="display:block" for the div, but not for any divs that may be nested below it. What should I change to get the right behavior? Thanks!!
Are there plans of having a spinning wheel style datepicker?
Like the iPhone/Android? Or is the widget at http://cubiq.org/dropbox/sw/ the only choice? Sencha touch has a nice implementation of the datepicker and I am wondering if this is on the roadmap.
The 'Back' feature is not working under chrome extension
Hey, I've developed with this little tool to help users solving 'words games'. In iPhone/Andriod it's working great but as I've put it as chrome extension everything is working fine except the 'back' button that do nothing. The tool is using jQuery 1.5 and JQM 1.3a Thanks, Ido
serialize returns nothing
I can't get the serialize function that is supposed to create a query string to work. My HTML contains one form with one input of type "text" inside it. Both of these return an empty string. var queryString = $('form').serialize(); var queryString = $('#myInputId').serialize(); What could I be doing wrong?
Using IDs in jQuery Mobile Pages
Is it bad practice to use the same ID in separate jQuery Mobile pages, since they will appear on the same page via AJAX? For example, if I have two separate HTML files linked together in a jQuery Mobile site, both containing an element with the same ID (for example <div id="example">), could they potentially cause conflict when jQuery Mobile appends the content from the second page into the original document? Or is this just my desktop web experience saying we should never have two ID tags on the
Feature reques: toggle attribute
usecase: function onclick(){ if(expression == true){ $("#myselector").attr("checked","checked"); }else $("#myselecto").removeAttr("checked"); }So, maybe better add $("myselector").toggleAttr("checked","checked");
How to dynamically add data-role="button"
I'm reading in some data from a web service to jquery mobile upon navigating to a new page (data-role="page") and I want to dynamically populate some jquery mobile link buttons, however it appears that the styles are not being applied through the data-role="button". My code is along the lines of var title = DataFromWebService; var newsButton = "<a href=\"#\" data-role=\"button\">"; newsButton+= title + "</a>"; $(".newslist").append(newsButton);The button renders as a plain a
[jQuery] jQuery cycle and handling new request/page changed
Hi all, I have a slideshow, which repeats on different pages (for example / index-1.html, /index-2.html etc). Slideshow is in main template, shared by all other pages. What I'm trying to do is if page is changed from index-1 to index-2 (e.g. user clicks on some link on page), slideshow on index-2 will start where slideshow on index-1 ended. I'm using cookie for this - storing index of current slide every time cycle.after event occurs and try to start from this index if cookie is set: <script type="text/javascript">
overlay needs to be .load() twice
Hi All I'm new here, my knowledge of JQuery is limited. Any help is appreciated. I'm using jquery.tools.min.js, overlay version 1.0.4, expose version 1.0.3. I know these are old but I have no choice on this. Here's code that demonstrates the problem: <!DOCTYPE html> <html> <head> <title>jQuery Tools standalone demo</title> <script type="text/javascript" src="jquery-1.3.1.min.js"></script> <script src="jquery.tools.min.js" type="text/javascript"></script> <style> #popup-content{ /*
Binding Click Events to Dynamically Created ListView?
I have a ListView that requires a click event. When I first initialize the list, everything works great. As I rebuild the list (as items are added, edited, and removed), the click event stops working. I have this HTML: <ul data-role="listview" data-theme="b" id="data-list" data-filter="true"></ul>I have this code in an init function that gets called on page load: // initialize listview if (window.localStorage.length - 1) { var contacts_list = [], i, key;
[jQuery] Acessing Json Data
Hi, I'm sending an array encoded with Json in my PHP code server-side, but when I try to fetch it in JQuery, I don't know what is the type of the object I'm dealing with, and I can't get any information of it. I tried to access it with object.length, object[index] and so on, but I'm allways getting "undefined". PHP Code: //example array $arr = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5); echo json_encode($arr); JavaScriptCode: $.ajax ({ type: "POST",
Problem with page navigation and multipage
Hi, I have the main HTML page "A" with only one data-role="page". I then load a new HTML page, which contains two data-role="page". JQM automatically shows the first data-role="page" and i am unable to link to the second one. Using firbug, i noticed that the second data-role="page" does not load in DOM. I tried using these urls: &ui-page=second_page /pagename&ui-page=second_page I also tried using data-url attribute for the data-role="page", using the same string as the ID. How can i solve this problem?
add paperclip to icons
Hi, any chance of getting a paperclip added to the default suite if icons? thanks Matt
Best chart/graph plugin
I am needing to create a "dashboard" of charts and graphs and have been looking around at all the many different plugins that can handle that. I am wanting to stay away from flash. What are you guys using? What is your favorite to use for charts and graphs?
jquery tabs with form submit
I'm using jquery tabs for navigation. I'm able to successfully load the selected tabs and also open links in the current tab instead of leaving the page - until I do a form submission. When the user submits the form, it calls a php script to save the form data to the database. After that runs successfully, how and where do you then set which tab is to be active and what content is to be loaded in the panel? For example within the Contacts tab, the user submits the new_contact.php form which then
[jQuery] Question about variable declaration
Hi :) in your plugins (I'm studying from the best here :))) I often find variable assignments like this: options = $.extend({ url: this.attr('action') || window.location.toString(), type: this.attr('method') || 'GET' }, options || {}); it's like url = this OR that. right? then I try, for example: var $sel = $('.left_selected') || $('.right_selected'); meaning $sel = $('.left_selected') but if you don't find any element with that class, $sel = $('.right_selected'). but this WON'T work :| where is
[jQuery] Declaring a new jquery variable
How can I declare a new jQuery variable? I want it to be global, but I don't want to use the window object. I know, a silly question. There shouldn't be any global variables, I know. But I need this for a temporary solution to a problem. I would like to access it like this: $.myvariable or $.myvariables.myvariable Thank you for your help!! Kia
Reload jquery mobile styles after ajax call
I an currently refreshing the data in a div panel by making ajax calls, but the the content is comming as plain HTML and jquery mobile is not able to apply its styles as it do when full page reload is done. I have a table in the web page and when i reload the page, buttons comes fully styled. But when i make ajax calls the buttuns are not styled at all. Code for buttons: <div style="text-align: center;" data-type="horizontal" data-role="controlgroup"> <a href="#" data-role="button"> < </a>
[jQuery] iFixPng Improved
After using my own flavour of iFixPng for a long time now, I decided it was time to publish it, so the community can make use of it as well. Although the performance will be a bit slower, it has 2 important improvements to make the use of transparent PNGs more painless in IE6: * The image or element with a background image doesn't have to be visible for the fix to work. * background-position in all possible formats is now supported, including an IE absolute position fix. (bottom: -1px || bottom:
Hide / protect source code
Hello, I'm developing a web application (a user interface). Is it possible to protect my code in any way? Thank you for your answers.
JQuery and XML
I am probably not doing this right, if so let me know. Using JQuery and .Ajax I and returning some XML. <Nodes> <Node> <Name>Title</Name> <Value>Foo<Value> <Name>Location</Name> <Value>Bar</Value> </Node> Etc. I am trying to retrieve all Value nodes for Titles. I have seen a bunch of examples for attribute selection but cannot get element selection and sibling relations. Anyone?
XML help..
hi, i am badly stuck, in need of 'SOS' help. THE PROBLEM-- my php server sends xml document as echos-- like echo "<option>".$value."</option>" i want to receive it on my user end using Ajax. here is my code ( i am usin CI) url: "<?=base_url();?>Main/prova", global: false, type: "POST", async: false, dataType: "html", // "xml doesn't work " data: "first_select="+ valore, //the name of the $_POST variable and its value success: function
setTimeout?
The effect I'm after is to have an div go blank for, say, 800ms and then be filled with content. I already have a js function which makes any content in the div "display none"; I'm looking for the way to combine this with a jQuery 'get' call. Can I do: myfunction() { displayNone(); setTimeout('jQueryfunction', 800); } ?
Remove Page from DOM
Hi all, I'm developing an app using jQuery Mobile that will use many pages, many of which will have images. The pages are in separate files, so I understand they will be injected via AJAX into the DOM as needed. I'm wondering if I need to worry about removing the pages from the DOM when the user is done with them, otherwise the DOM will contain lots of large hidden pages, that presumably could be eating up memory on phones. Is there a way to remove pages from the DOM and have them to be loaded
How to make jquery autocomplete to work for a contenteditable DIV instead of just INPUT, TEXTAREA fields.
I have a use-case to make a DIV element act as a TEXTAREA by setting its attribute to contenteditable="true". Can I use the DIV's DOM handle for the autocompleter to behave as a textarea autocompleter. Currently the plugin 'as is' is not working over the DIV handle. What changes should I do for the plugin to work for all the above elements? Thanks in advance!
Fade out an initial image to reveal home page
Hello, I am completely new to jQuery, and I don't even know how to approach or implement what I am trying to do. Before the home page of a site i've developed appears, I want the logo of the company to appear on the screen, then fade out to reveal the web page with full functionality. I also could do this be fading out the logo to reveal a static image of the home page which then could redirect to actual home page. Please help, and help provided is greatly appreciated! Thanks! Trevor
Rounded corners causes error in jQuery
Hello guys! I'm new to jQuery but i managed to have rounded corners using malsup's great plugin. I'm posting here because Internet Explorer gave me error on the jQuery itself, not in the plugin. This is the busillis: i used this code: [code] $(document).ready( function(){ $('#container').corner("24px"); $('.bloccoCentrale').corner("10px"); }); [/code] and it works flawlessly in Chrome and FF, but not in I.E. 7. Now... i tried to use CurvyCorners plugin and it doesn't work completely: i mean,
[jQuery] Select box plugin update
Updated my plugin for removing options from a select box. It now takes a regular expression as well as a string and number. http://www.texotela.co.uk/code/jquery/select/ _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
tap/click event firing multiple times for elements of listview
I currently have a simple, 2-page application. The first page is a splash page of sort with a single button that leads to a list view. When the application first loads, the listview is dynamically filled with content. A binding is then created on the "li" elements to capture any clicks/taps. This handler will ultimately be responsible for loading the next page, however, I'm having problems right now. Pretty sporadically, when list elements are clicked, the event will fire twice. Sometimes just once,
Loupe Plugin toggle
Hello, I am sure this seems simple for most of you, but I can't seems to make this (http://jdbartlett.github.com/loupe/ ) Loupe Plugin toggle on and off. I have tried adding and removing the class the plugin uses to identify which element to zoom. I have also tried directly .hide the class used to style the loop itself. I've spend hours looking around the net, no help. Ideas? All help is great. Thanks everyone. I tried this: jQuery('.theloup').loupe({ width: 200, // width of magnifier
Indicating disabled items on a list view
Is there a simple way to indicate in jquery that a specific item in a list view should be disabled. By "disabled" I mean that the item must show up as greyed-out and it must not show the pointer cursor; instead it should show the default cursor for an item that cannot be clicked. Lastly, the disabled item should not have an action associated with it when a click occurs, so the anchor tag enclosed in the <li> element must not be followed when a click occurs. I am needing to disable and enable items
How to go back previous page programmatically?
Hello, how can i go back to the previous page programmatically? I used history.go(-1) but it is not good because the previous page will not be reloaded. Thanks
Next Page