setInterval works when alert is included in if conditions, else it works only once.
Hi All, My question is following : I have code snippet as follows : var i = 0; function func2() { if (i==0){ document.getElementById('frame1').contentWindow.opts[selected].setAttribute('name','channels'); var strValue = document.getElementById('frame1').contentWindow.opts[selected].getAttribute('name'); //alert("Attribute value set :" + strValue); document.getElementById('frame1').contentWindow.handleKeyCode(VK_ENTER); i++;
Disable all page state persistence in jQuery Mobile
Hello, Is there a way to disable page state persistence in jQuery mobile? Basically, I don't want pages to jump to the last-viewed location when I navigate back-n-forth. I don't want any collapsibles to maintain their state between page transitions either. I want every page call to act as if that is the first page call. However, I DO want the location to be maintained with hashes. Do I have to change $.mobile.changePage() or is there a flag that can be set somewhere to disable this behavior? Thank
How to load external content into <div class="content">?
how can i use .load() or .get() to load external content into div? i have code below but doesnt work? i dont know what is the problem. $(document).ready (function(){ $("tabs1").click(function(){ $("content").load("about.php"); }); });
document width returns null?
The following code returns me a null value on internet explorer but works fine on firefox and opera. var iW = $(document).width(); alert(iW); any help would be appreciated, thanks
Styling multiple tables
I have multiple tables with this similar structure: <table> <tr> <th>Transaction Date</th> <th>Description</th> <th>Points</th> </tr> <tr> <td>04/11/2011</td> <td>New account bonus</td> <td>100</td> </tr>
Persistent footer navigation - is there a way to keep it visible always?
I'm using alpha 3. The navigation is working great thus far, but I'd really like to not have it disappear and re-appear like it currently does on scrolling. Instead, it would be great if it can stay fixed like it is on the iphone native UI.
Gracefully degrade to JS-only site in sub-A-grade browsers?
Firstly, I love jQuery Mobile. Secondly, sorry if this question has been asked before, but I couldn't find it if so! I would like to use jQuery Mobile *only* in A-grade browsers, and degrade gracefully to a JavaScript-only site in other browsers. In other words, not load the jQuery Mobile CSS or JS at all in other browsers. What is the recommended way to achieve this? Bonus points for actual code :) Thanks.
Close Modal dialog by clicking on the background?
is there a way to get the modal dialog box to close by clicking on the background - .ui-widget-overlay? I tried $('.ui-widget-overlay').click(function(){ $('#dialog').dialog('close'); }); but it didn't work. Can anyone help?
A4.1 : IE7 taking 100% CPU
Hi All, I want to migrate from a3 to a4 to provide support for IE and wp7. It is described somewhere in Release notes of 4.1 that says, "An error was causing jQuery Mobile to fail in IE8 & 9, but we’ve resolved the error by adding an activeElement conditional and pages now render suprisingly well. There are a few style tweaks needed to make this perfect, especially on form elements, but jQuery Mobile now works in IE 7, 8 and 9." However a4.1 demo site works well in IE7 , I'm having the issue with
Can someone show me how to move some code to a function?
Hi Guys, I have the following block of code to update order totals when either one of two classes change. Can someone show me how I can split this into a function so I can call the same code under other circumstances? $('.update-subtotal input.number').change(function(){ if (!$(this).hasClass('quantity')) $(this).val(($(this).val()*1).toFixed(2)); var parent = $(this).parents('.update-subtotal:first'); var quantity = $(parent).find('input.quantity').val(); var lineprice = $(parent).find('input.lineprice').val();
beginner question about the use of .has(), if and .parent()
My question is the following: I have got a little CMS (with a WYSIWYG editor) for somebody who is not familiar with HTML and CSS at all. That's why I simply can't adress classes/ids/... The issue: As I cannot adress classes/ids I thought I would search for a certain pattern <ul> <li> (<a>)<img />(</a>) <div></div> </li> </ul>now all I want to do is to do .addClass("info") on every <div> that is in the pattern. I already tried for(var i=0; i < $("img").length; i++)
setting a focus event not working
Hi experts, I am working in a third party application which has a hook into their window.onload() function.(it calls my fnCustomOnload()). In my fnCustomOnload() function I have tried to bind a focusout event on a particular input and have it call a function callled fnGetRestriction(). The function fnGetRestriction() actually works without errors, I have forced it with the grabfocus.focus() (lines 2 and 3) but it is called not being called any time other than once at the beginning when it is force
turn off ajax for a particular link
Is it possible to turn off ajax transitioning for a particular link only? For now, I'm turning off ajax globally using $.mobile.ajaxEnabled
Use a form variable into another html page?
Hi, I have a form that launch a file chooser to allow the user to select a picture. On clicking submit i want to open another page and use the file the user chose and display it. Is there a way to do it without php or asp... i mean just html and jquery? here is what i have up to now: <!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"
each and this not working?
why does this not work? it says undefined. If i do $('input').val(); outside of the each then it will work its like the $('this') is not working. Please help. <!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="wrapper"> <form action=""> <label for="tags">Enter Some Tags, Bro.</label> <input type="text" value="wer" /> <input type="text"
remove() callback
how i can use a callback function with remove() of jquery api
Cursor wrong placement in IE
Hi, Would you please try the following in IE: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script> <style type="text/css"> * { font-family: Verdana; font-size: 96%; } label { width: 10em; float: left; } label.error { float: none; color:
a4: data-title attribute not working
Per the release notes of Auto-updating page titles for Ajax navigation, there's a new attribute that should one to manually define a title. Either the attribute doesn't work, or I am missing something obvious. Also, I tried the attribute on different spots, just to verify. Correct me if I am wrong, but it should go with the DIV that has the data-role="page" attribute. What am I missing to have the data-title attribute work correctly? <!DOCTYPE html> <html> <head> <title>Page Title 0</title> <link
How to automatic refresh?, just one time, each time a user enters a page ...
I have a problem, I'm using a script that is okay, but sometimes, when I enter a second time to its page it doesn't load well making the markup to seem broken, it is fixed when I refresh. Any help how to make an automatic refresh after 5 seconds? Just 1 time, each time a user enters that page. Thanks in advance!
Remove inline CSS completely
I know $(element).css('top',''); should remove any value for top. However, in IE7 (or rather, IE9b in compatibility mode), it still leaves style="TOP: ;" on the element (as given by: alert($(element).attr('style'));). I know this shouldn't be a problem, but for some reason it's playing around with my element, which has external CSS settings it as bottom:5px;. The top:; is applied, but then I want it completely removed. However, there might well be other css inline, so I don't want to removeAttr('style').
Inital Animation
Hi. I'd like to know how I can produce an initial animation. I want animate a div automatically when the page is opened. I can animate my div associating the animation, for example, to a button or to a mouseover action, but i can't create an automatic animation. I use a simple code $(window).load(function(){ $("#mydiv").animate({width:"800"},slow) }); Can you help me please?
Transparency Issue in IE8 Animation Fade In / Out
I have a problem with my Jquery CSS Sprite animation. This works fine in all other browsers. The buttons leave a black outline around them on the transition. For the life of me I have not been able to find a solution. Here's the link to the site in question http://manoucher.com/about-me/
Link to Non-Mobile Page
I know this must have a simple answer but I can't seem to get a link to the non-mobile version of our site's page working. I tried the rel="external" and the data-ajax="false" but I just can't get it to load a page outside of Jquery Mobile, even target="_blank" doesn't work. Any ideas?
jQuery Validate problem
Having some problems with implenting the jQuery validate plugin. This is the code I'm working with: http://pastie.org/1811644 Demo site: http://persturesson.com/test.html It doesn't validate the form, it just sends me to check.php directly
History.js in jQM
Is there an existing plugin for jQM that uses History.js as the navigation model? Or is it in the roadmap for jQM core (or some other support for HTML5's History API)?
separate images for each tab
Hello All, How can I make each tab unique. Right now all the tabs are using the same css classes, which does not allow us to have separate images for each tab. Does anybody have had this issue before? Any help? thanks ashyui
All versions of IE before IE-9 jumble up my screens
I have a page: at www.zionism101.org/defaultfornow.aspx. It has a menu and a logo that are both placed by javascript. This works fine in IE-9, and in chrome, and in Firefox, but in IE-8, I notice that (on my slow computer) I actually see the menu moving from the left side to come to its resting place in the center, and the logo also moves to its final resting place. And its worse than that. a whole bunch of things are superimposed on top of each other before the jquery straightens them out.
on Click of link a modal window opens or div with textarea inside it opens and values transferring to main textarea
My try is quite Complex This: 1. Textarea Box above with unique name suppose values_#dynamic# 2. Now here is the link Edit, which has a unique id names as edit_#dynamic# and it is declared inside a Span tag, a Div tag can also be used, but just for sake i used span. 3. Now clicking on the Edit will open a POPUP just underneath the link and values it will start entring, it will 3 buttons, Save will close the popup, value get tranferred to the textarea main one and the popup will close. 4. Other buttons
Dropdown menu failing in IE
Hello guys. I'm making a drop down menu and it works great in all modern browser but it fails in IE7 and IE8. when i try to move the mouse from the main menu item to the opened dropdown, this disappears. What do I need here? This is the page: http://bwp-dev2.wedo-projects.de/ueber-uns/ and this is the JS code $("nav li").hover(function(){ $(".subnavi", $(this)).show(); }, function(){ $(".subnavi", $(this)).hide(); }); Appears to be an issue of jQuery when detecting hover over subnavi when
jquery cycle and z-index issue
I'm having trouble with the z-order in a slideshow made with cycle. Basically, my slides are an unordered list. Each list item is a slide with a background image, some text and a link. The relevant snippets of code are shown below. You should easily be able to take this code and make a test page if it would help. I have two absolutely positioned elements. One that is a div that goes around the entire <ul> that kind of frames the slide show. A second one is the link inside each <li>. The problem is
jquery datepick - dynamic maxDate
I'm using the datePick jquery plugin, adaptation of datePicker. I have a date range starting with tomorrow (minDate:+1). I want to limit the range of dates to 30 days, but want it to be 30 days from the selected start date. Is it actually already built in and I'm missing something, or does the maxDate need to be customized onSelect of the first date?
Problem with visible selector and toggle in a unique scenario in Chrome
Ok, so I can get the visible selector and the toggle method to work in Chrome (v10.0.648.205 in Win7) in other scenarios but in the attached page they won't work and I can't figure out why. I followed the logic to the Sizzle function but I got lost there. Yes, this all works just fine in IE8 and FF 3.6 When you extract the attached page information (I saved the page from inside Chrome) the problematic method is in \Terminate_Coverage_files\OLETermination.js. The function is the 3rd from the top in
cluetip, load Asp into tooltip
Hi, i posted this in an allready answered threat, so maybe better doing it here. i have an asp file that pulls content from a database on mouseover script now. but i would like to change it to start using Cluetip. the link itself to the page with arguments looks like this: "showObject.asp?Id=<%=arrContainers(1, i)%>&d=<%= strTid%>&typ=1&ct=<%= intContainerTypID%>" now, i have learnt that i apparently have to edit the ajaxprocess abit in order for this to work? basicly what i am lookign for is a mouseover
I want to not load plugins for pages that don't need them.
Yeah, that's an awkward sounding title, but it's the only way I could think to word it. The context I have a site with a bunch of pages. Most pages have some kind of jquery-enabled behaviour. Some don't. Some pages require the loading of plugins. Not all pages require the same plugins. The Problem I have a working, single js script for all the behaviours across my site. The browser loads a page. A plugin, say fancybox, is not required for that particular page. It is, however, required for another
"thisUrl is undefined" || "X is undefined" FIX
~ LINE 2551 : ORIGINAL: //rewrite src and href attrs to use a base url if( !$.support.dynamicBaseTag ){ var newPath = path.get( fileUrl ); to.find( "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]" ).each(function(){ var thisAttr = $(this).is('[href]') ? 'href' : 'src', thisUrl = $(this).attr(thisAttr); //if full path exists and is same, chop it - helps IE out thisUrl = thisUrl.replace( location.protocol +
filter() performance IE 7&9 vs. IE 8 ?
Im having a hard time understanding why my code is so much slower in IE8 than in IE7 and IE9. Are there any IE8 specific behavior i've missed or why would my code result in up to 10 times slower execution in IE8. IE7 executes in 300ms, IE9 in a few ms more and IE7 in about 3000ms :( Any ideas? $('.item').filter(function(i) { var $e = $(this); return ( !($e.find('.form-value:visible').length) && !$e.find('.element_header').length) ); }).remove();
JQuery UI Tab and Cookies
This works. $(function(){ // Tabs $('#tabs').tabs(); }); but when I do this I get form stacking. How do I fix? $(function(){ // Tabs $('#tabs').tabs( { cookie: { // store cookie for a day, without, it would be a session cookie expires: 1 } } ); });
jQuery to work out average user rating when leaving a comment (wordpress)
Hi, I need to be able to work out the average star rating each user submits when leaving a comments on a wordpress site. The is a star rating system which the user has to select, this is out of 5 stars, and it rates things like: - - Value for money - Customer Service - Professionalism - Flexibility - Quality of service So the user will rate each one of the above out of 5. They submit their comment and then their result gets displayed as an image within the comment reply. Now my problem
Using variables instead of $(#test).html
I have code where I want to take this: $('#haveImg0').html(haveArray[x]); and use a variable instead so I can just loop through a for loop. The full code is for (var x=0; x<(haveArray.length); x++) { $('#haveImg'+x;).html(haveArray[x]); } But this doesn't work. Is there anyway to do this instead of having to individually type out all the different divs? Thank you in advance!!!!
counting classes
Hey Guys, I`m looking for a way to count the classes of some table rows. My big problem is, that i don`t know the class names. So, they should be counted variable. <table id="testTable"> <tr class="class1"> <td class="multiplier">1</td> <td>class1</td> <td>class1</td> <td>class1</td> </tr> <tr class="class1"> <td class="multiplier">2</td> <td>class1</td> <td>class1</td> <td>class1</td> </tr> <tr class="class2">
Next Page