jQuery('[attribute$="value"]') - Doesn't work
Hi! I'm doing something like this: $('#Buttons li a').click(function(){ ... var ext=0; if($('this[href$=".html"]')) { ext=5; } else if($('this[href$=".php"]')) { ext=4; } window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-ext); ... The problem is that I'm clicking in a <a> with the href="test.php" but it never enters in the "else if" and I don't know why... Thanks for your time.
screen flicker using .show()
Hi there I am getting screen flicker during the .show() method under Firefox 3.6. This doesn't happen in FF4, Chrome, Safari and IE8. I have the div table size of fixed value (so no vertical resize needs to be done) of the divs (a list of 20 table items) operated on by the .show() (and .hide()) but still I am getting very bad screen flicker (the whole screen goes white for a second (or even two...) before refreshing which gives users a seriously bad headache). This flicker only seems to happen
Bug: jQuery.position() after css transform: Webkit & Firefox different results
// Assuming absolute positioning $myDiv.position({left:100,top:100}); // assuming we have a "transform" jQuery.CSSHooks for MozTranform and WebkitTransform $myDiv.css("transform","translate(50px, 50px)"); var newLeft = $myDiv.position().left; // on Firefox 3.6.15 // newLeft == 100 // on Webkit based browsers // newLeft == 150 Not sure which one is the right behavior (I prefer the Webkit result), but would be great to have jQuery normalizing it. Doing this in the application is very ineffective.
Jquery Validate Plugin: A confirm alert on submit
Hello, I am using the validate plugin to perform validations on a form. I would like to show a confirm message ( alert with ok and cancel ) upon submit and successful vaildation. I have tried the following but it does not work: $("#myForm").validate({ rules: { ---- --- }, showErrors: function(errorMap, errorList) { var errors = this.numberOfInvalids(); if (errors){ var message = errors == 1
Datepicker - Enable weekend only
Hi, I have searched Google alot, but cannot find a good code for it: How can I enable weekenddays only? My current code is located in a tpl file of Opencart: <?php if ($bookingdate_status) { ?> <link rel="stylesheet" type="text/css" href="./admin/view/javascript/jquery/ui/themes/fsol/ui.all.css" /> <script type="text/javascript" src="./admin/view/javascript/jquery/ui/ui.datepicker.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.bookingdate').datepicker( {dateFormat:
jqModal - Problem executing Multiple Triggers
Hello, jQuery Forum; I hope I'm in the right place I'm trying to use a jqModal Pop-Up to show product images from a list of thumbnail images on a main page, having difficulty getting multiple triggers to work. The first instance works fine, but subsequent instances show the same image in the pop-up as the first instance. I'm attaching the page code here, but it can also be seen at http://www.digifolders.com /jqModal_p rob.html . The page holds all the code elements required for the execution of
Using JQuery To Select and Option From a Drop Down Menu?
How can I do this with jquery. I tried this- $("#months option").each(function() { val = $(this).attr("value"); if(val == month) { $(this).attr("SELECTED", ""); } }); And it successfully added "selected" to the correct item. But it wasn't actually selected. How can I do this correctly?
Tabs based on the Day of the week
Hi, when the page loads I want to display both the div content and highlight the tab for the current day. I've found some code that loads the correct div based on the day but doesn't change the tab that's highlighted: $(function () { var tabContainers = $('div.tabs > div'); $('div.tabs ul.tabNavigation a').click(function () { tabContainers.hide().filter(this.hash).show(); $('div.tabs ul.tabNavigation a').removeClass('selected'); $(this).addClass('selected');
Accordion plugin and div height
Please help me... I use accordion (only one rib) for hiding/showing login form, latest news, etc... For example, If someone does not want to see latest news he can collapse that section by clicking on header. But now i have a problem every section is in its own DIV, i set divs height:auto. but div doesn't expand when i expand accordion. I tried everything but it doesn't seem to work. <div id="leftColumn"> <div id="main"> <h3><a href="#" id="login" >LOGIN</a></h3> <form> <label>E-mail</label><br/>
Using Variables in Jquery
I working on trying to get my condense my code in jquery I have a small chunk of code that is being reused over and over inside of a function, I would like to turn this: $(document).ready(function () { $("a.transitionWhite000").fancybox({ 'overlayColor': '#FFF', 'overlayShow': true, 'transitionIn': 'fade', 'speedIn': 1300, 'transitionOut': 'fade', 'speedOut': 600, 'overlayOpacity': 0.970, }); $("a.transitionBlack000").fancybox({
Offset problems with Sortable
I implemented the example that is on the site for the sortable methods. The only problem is that the boxes are about 300 pixels below and 50 pixels right of where I click. The page I am implementing is a Xajax driven custom page that has a lot of complicated nesting, etc. I think it is an issue that jQuery cannot correctly determine where my mouse is. I am sure there is a way to address this automatically or manually. The problem is I don't know where to start. Any ideas? Thanks, Bryan
Trigger an event at the bottom of screen with scrollview plugin for jquerymobile
Hi: I would like to trigger an event when the user scrolls to the bottom of the page when using the scrollview plugin for jquerymobile. This will be handy for "infinite scroll" functionality: as you get to the end of content items are added to the end of a list. The scroll (and therefore the fun ;-) ) never ends. I got it to work with a hack but I'd like to see if there was a cleaner way to do this. At the bottom of the _stopMScroll function I added: var c = this._$clip; var v =
Superfish nav-bar menu level 3 inline display is not working
I can get the second level dropdown to display inline, but the third level stacks. Anybody have a solution for this?
Need help converting to jquery
I have a javascript code that I need to convert to jquery and be able to attach each function to a link id. Is this possible? Code is listed below --------------------------------------- function toggle_hide(id) { var e = document.getElementById(id); if(e.style.visibility == 'visible') e.style.visibility = 'hidden'; else e.style.visibility = 'hidden'; } //--> function toggle_home(id) { var e = document.getElementById(id); if(e.style.visibility == 'visible') e.style.visibility = 'hidden';
jQuery Selectable: Select Multiple Fields and label them
I need to replicate a non-digital functionality of our employment application where a student can box in hours in a schedule of when they're available, when they're in class and when they're unavailable. I thought jQuery's Selectable function would be the right trick. Can this be done? What's the easiest way? Here's the image of what I need done: http://campusrec.colostate.edu/images/Upload/workweekSchedule.jpg Thanks!
Where's vmouseclick?
Testing out the new A4 release and the new vmouseclick virtual event doesn't seem to be firing. If I bind a regular click event to the element everything works as it should, but if I change it to vmouseclick nothing happens.
jQueryMobile forum - shows empty forum page on page 2 of errors
http://forum.jquery.com/jquery-mobile/filter/problems/2 This page shows a blank-ish page for me: http://img6.imagebanana.com/img/4z7qzd78/jqueryforum.png
thumbnails listview
I have a listview with thumbnails, and updated my code to cope with alpha 4 requirements on the anchor to cover all the contents of a list item, including the thumbnails. So, my code ended like this: <li class="ui-li-has-thumb ui-btn ui-btn-icon-right ui-li ui-btn-up-c" data-theme="c"> <div class="ui-btn-inner ui-li"> <div class="ui-btn-text"> <a href="javascript:conectar('10482');" class="ui-link-inherit"> <img src="http://www.e-xis.com.br/ftpbahia/galeria/g/{40F5E5E2-CE47-49B0-8AE8-4E4195189C6E}_colo.jpg"
Large Select option cropping title/header
Example: http://jsfiddle.net/Y6WfL/7/ In the example I have taken the code from the JQM site ( http://jquerymobile.com/demos/1.0a4/docs/forms/forms-selects.html ) The documentation says that if a option has no value it will be used for the header, but in the example the header is broken as I don't see the text and the close button is only half visible. Any thoughts on how to fix this?
How is $('<img/>') different form $('img')
I noticed this selector $('<img/>') I am wondering what is it really selecting? Is that different from the tag selector $('img')? And a piece of code: $sometihing.find('img').each(function(){ var $img = $(this); $('<img/>').load(function(){ //some function }).attr('src',$img.attr('src')); }); Why does it have to find its own " src " and give it to itself again? I appreciate if some can answer that for me.
jqModal - Problem Executing Multiple Triggers
Hello, Forum; I hope I'm in the right place. I'm trying to use a jqModal Pop-Up to show product images from a list of thumbnail images on a main page, running into difficulty getting multiple trigger events to execute. The first instance works fine, but subsequent instances show the same image in the pop-up as the first instance. I'm attaching the page code here, but it can also be seen at: http://www.digifolders.com/jqModal_prob.html. The page holds all the code elements required for the execution
JSON returned from php...
Every parse example I have seen on the internet is the well formed; jQuery.parseJSON( ' {"sid":"123455","client_id":"1","last_name":"Anderson","first_name":"Alan","institution_id":"1"} '); What is the easy way to get from this; {"posts":[{"post":{"sid":"123455","client_id":"1","last_name":"Anderson","first_name":"Alan","institution_id":"1"}}, {"post":{"sid":"b","client_id":"4","last_name":"b","first_name":"b","institution_id":"1"}}]} to 'well formed' so that jQuery.parseJSON( data ) will
$.fn.bind and fn.apply() problems on draggables
Hi, Not sure wether this should be here on in the UI (since it's revolves around both, feel free to move if you think I've posted it wrongly) I've been trying to wrap all my jQuery binds with try/catch using the source code found on http://pastebin.com/f579d999d. Demo on http://bivald.com/jquerydraggable.html It basically wrap everything in a try/catch letting you catch errors like this: $.handleErrors(function(e){ console.log("an error occurred"); console.log(e); }); However, this does
bug: tapping listview item multiple times
It seems there's a strange behaviour happening when you tap a list view item multiple times before it finishes loading the target content (in this case, a static html file on the device). It will continue to load the content in the new page, but when you go back to the list view, it will then fire off one of the other taps and load the content page again. This is when i'm in a nested list, and I can even reproduce it in a desktop browser from the demo page, but you have to try and spam click the
$plugin_function "is not a function"
Hi, I created my first plug-in using the template in the documentation. I don't need any DOM element for it to work, so ideally, I'd like to call it with $.scriptCache('function_name',param) but it throws an error saying $.scriptCache is not a function. While something like $("body").scriptCache('function_name',param) works as intended. What am I doing wrong? I use JQuery 1.5.1 if it changes anything.
Request For Comment: Jquery Idea Exchange Plugin
Hi, The JQuery Idea Exchange is the first jquery plugin created by me. It will allow the users to view ideas, post comments on the ideas, vote for the idea. The code is hosted on http://code.google.com/p/jquery-idea-exchange/. I would like to seek your reviews, comments on the same. Best Regards, Anubhav Bhojne
A4: right arrows not visible in list items on HTC Desire
Can someone explain to me why with JQM A4 on Android the right arrows are not visible in list items in this application: http://www.certeza.nl/politicos/ ? They are visible in Chrome and Iphone Simulator.
I would like something to "fall" from the top of the page to the bottom (and forcing a scroll)
I would like a little animation to "fall" from the top of my page and then fall to the bottom, forcing a scroll. Does anyone have any suggestions on what I should look at to start modifying to do this>
Problem with jquery validate compare with MVC
I have a problem with the compare validator when running under Microsoft MVC3 and jquery 1.5.x I have two password fields that are validated to enforce the same response (password and re-type password). With jQuery 1.4.2 the compare validator works correctly, with jQuery 1.5.x the validator always fires. Unfortunately, I don't have a public server where I can demonstrate the problem, however, here is the source code for the two input elements: <input data-val="true" data-val-length="&#39;Password&#39;
A4 nested listview with image causes layout problem
Hi, Thanks for the great work on JQuery mobile! In a3 I had a nested split button list view with image thunmbnails. There appears to be some issues with that in a4. To narrow it down I tried a nested list view with image thumbnails. On the nested list the back button is cut off. It seems to make no difference if the image exists or not. If I remove the img the sub page lays out fine. Here is a repro: <html> <head> <title>Page Title</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.css"
Error passing serialized array.
Im trying to pass a form that has an array of Importances in it. I can use the Jquery to pick up the form elements and serialize them, but having trouble pass the 'string' to a PHP script through AJax $('#form').submit(function(){ var impArray = $('#form').serialize(); var phpScript5 = 'update_KB.php'; $.ajaxSetup({ cache: true }); var ajaxPass6 = 'imp=' + impArray; var ajax_load5 = '<img src="loading-icon.gif" alt="loading..." />';
Custom 500 pages?
I've got a custom 500 page, e.g. if the user goes to say this url using their browser: http://mysite.com/foo and foo causes a server error, then it sends back a custom error page. If I access the custom error page directly, e.g. http://mysite.com/500 then it renders as expected using jQueryMobile. But if I access http://mysite.com/foo then the page gets rendered as plain text basically. Is it possible that jQueryMobile is detecting that the response code is 500 and not 200 and therefore deciding
keeping accordion menu open when page refreshes
Hi there - I've been searching for a bit, but I cannot seem to find a solution to keep an accordion menu expanded when the page refreshes. I found some stuff with using $cookie, but I am not sure exactly what it would be looking for or calling in my code. Here's my code : <script type="text/javascript"> $(document).ready(function(){ $( '#search-nav > li > ul' ) .hide() .click(function( e ){ e.stopPropagation(); }); $('#search-nav > li').toggle(function(){ $(this) .css('background-position',
Question - call tag by tag inside the tag
Hello, if i have this code: <div id="newyork"> <div id="test"> Hello </div> </div> And bye $("test") I want call to newyork, how can I do that? somthing like $("test").getinsidetag();
Alpha 4 problems
Hi guys, I'm working on a mobile application and I use PhoneGap & jquery mobile A4 and I use a WEB SQL database (to reduce network usage). Here is a list of issues: 1) Footer: I'd like to keep the same footer and I use the data-id to replicate it in every page. It worked in alpha 3 but now the footer isn't replicated automatically anymore. 2) GET parameters: I tried to use $.mobile.changePage specified at http://jquerymobile.com/demos/1.0a4/#docs/api/methods.html to pass GET parameters to the new
Dynamic List, returning the ID, Text or Unique value.
Hi, I have populated a list via XML but what I would like to have is the end user click on the list item so I can extract the content - but I do not know how to do this. The list is populated through a for/next loop that builds the list - see below. $(xml).find('club').each(function() { $('#clubs').append('<li><a href="#">'+$(this).find('team').text()+'</a></li>'); }); This outputs a list of 5 items in but obviously will vary over time. How would I be able to extract the content of each item? i.e,
Alpha 4 - Getting error on changing page.
Hi folks, great job the release of A4! I've updated my webapp today but i'm getting some errors while changing pages. Some of my pages wont load and the loading screen with spinner keeps spinning, nothing is happening. I've listed the error below, any idea? Uncaught TypeError: Cannot call method 'replace' of undefined a.mobile.changePage.a.ajax.success jquery.mobile-1.0a4.min.js:59 d.d.extend.each jquery-1.5.2.min.js:16 d.d.fn.d.each jquery-1.5.2.min.js:16 a.mobile.changePage.a.ajax.success jquery-1.5.2.min.js
a new loaded html elements can't be applied jquery function?
Previously, I already make this line of code $('#bank').click(function(event){ // request form $('#middle').load('form/bank.html'); $('#butang').click(function(){ alert("boleh"); }); event.preventDefault(); }); Which means, once after a link namely as "bank" is clicked,then it will extract the bank.html content into the middle div. And I already put a button ID named as "butang" over that bank.html. But why after the content is nicely rendered,
Variables, Passing Parameters, and Functions
Hey guys, I am working on an app and have reached a standstill on somthing I thought would be simple. I need to access a variable that I am setting from a click/tap event in a pagebeforehide event. Am I insane? Is this impossible?? See below: $('.list_title').live('tap click', function(event) { listID = $(this).attr('id').replace('list-', ''); //setting the listID here when a user clicks. want to use it later. }); $('#add_list, #erase_all').live('pagebeforehide',function(event, ui){ alert(listID);
Time to take the plunge
I thought that I would introduce myself as I am sure I will be in these forums a lot of the time from now on. Having developed numerous static sites in PHP/MYSQL/JavaScript I have been given an opportunity by one of my clients to give their sites a bit of movement. So a few months ago I starting looking at AJAX and Dom manipulation using JavaScript, which the client really liked but mow they are asking for more movement on the site and that's when I started to look at jQuery. I must admit at first
Next Page