iPhone push and hold
Hey, I just wanted to report a strange bug. I am using a listview to hold some links to other pages, when one touches and holds one of these bugs, and then releases (before the little menu that asks you if you want to open the link in a new page and what not comes up) the text from the button is removed. --Ashley
getting the value of a string
I have this code (which works) and my question is... is there a way to get the length's value in 1 line and maybe shorten this code? var thisURL = window.location.href; var getLastSplit = thisURL.split('&').length-1; var lastValue = thisURL.split('&')[getLastSplit]; if(lastValue == 'callManager') { $('#CallManager').trigger('click'); }
Bring back the old jQuery UI website
I used to think the old jQuery UI website was a bit clunky but now it's just useless... what happened to the great API documentation with all the code samples in it? Now it's just miles and miles of text with no working examples, and the examples that are there are very basic and show little of the complex functionality that can be achieved with the plethora of options in the API. I also find that I'm having to open more than one tab as the APIs are no longer on the examples pages.
Conditional redirect a page using javascript
Hi, I have the following page: http://codeturtle.com/files/testj.html I am expecting nothing happening when the button is clicked because it has a "return false" statement, but it returns a page saying "false". How do make the function do nothing on certain conditions? Thanks
jQuery mobile as the "unified" option
We are building a web application that shows things like statistics and graphs (simple stuff). Evolution 1: We started with jQuery + PHP + MySQL first in the general Ajax style. Evolution 2: We realized that we are better off using a third party table (http://datatables.net/) and the Widgets from jQuery-UI. Evolution 3: (We realized that mobile version of the site is a must have and started exploring jQuery-mobile). There are two arguments right now - have one codebase for regular desktop
How to Add array of Div to a content
Can you please let me know how we can add divs to body or other content based on an array size? for example if I have an array of var arr = [ "one", "two", "three", "four", "five" ] how I can add 5 div based on this into body?
How to trigger HTML5 play sound on Mobile Safari
<audio id="play" src="sound/some-sound.ogg" preload="auto"></audio> <button id="btn" value="play sound"></button> $(function() { $('#btn').on('click', function() { $('#play').trigger('play'); setTimeout(function() { $('#play').trigger('play'); }, 3000); }); }); This code works for most mobile browser but Apple Safari, few mobile browsers does not support play html5 format sound without click, therefore they will only hear
Jquery and chrome weird thing...
Ok well I've been trying to resolve this for days with no avail, worst thing is looking at the code there shouldn't be a problem, chrome just seems to find one.I'm using the code : if($("#chatscreen")[0].scrollHeight - $("#chatscreen").scrollTop() == $("#chatscreen").outerHeight()) { alert("work"); } to check if a div's scroll is at the bottom of the page and it works fine for firefox and internet explorer but not chrome. When I use this other code $("#chatscreen").scroll(function(){
Download instructions
When I click the 'Download jQuery' button i get a page that starts like this: /*! jQuery v1.8.2 jquery.com | jquery.org/license */ (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function
how to bind another trigger to autocomplete
hi there, i'm kinda new to this and i'm using the autocomplete feature that works great using this : $(function() { var availableTags = []; $( "#tags" ).autocomplete({ source: availableTags }); }); when i type it's autocomplete. the question is how do i make it work when i'm using a virutal keyboard that i made from div's that add letters directlly to the tags inputtext ?
How to do text ???...Fly-To/Drag-To...??? Effect
Hello, Ive got an auto-suggest application. Im trying to develop (for lack of better description) a "Fly-To/Drag-To" effect from my auto-suggest list. Im trying to get the data from the list to the text fields using the effect. Where it appears that the data is moving/dragged across the screen from the list to to the text field. Does anyone know of any examples, or had any experience using a text moving/dragging method. Thanx in advance ...
How to truncate the text in the options of select tag by adding ellipsis in the text?
Hello, I am trying to truncate the text which is longer for the select tag. Can anyone help on this issue? my select tag is <select> <option>ABCDEFGHIJKLMN</option> <option>AAAAAAAAAAAAAAAAAAAAAAAAAA</option> <option>AAAAAAAAAAAAAAAAAAAAAAAAAA</option> <option>AAAAAAAAAAAAAAAAAAAAAAAAAA</option> <option>AAAAAAAAAAAAAAAAAAAAAAAAAA</option> <option>BBBBBBBBBBBBBBBBBBBBBBBBBB</option> </select> width of my select tag is 180px; the text is not fitting in the dropdown when I select, I want to truncate
abort a request in $.ajax
Hi! How its possible to abort a request in $.ajax. In "success" I get the request as data. I want only to display data without making a request. $.ajax({ type: 'POST', url: url, data: ({ajax_render:1}), success: function(data, status, jqXHR) { $('.c-left').html(data); }, })
Filter messed up with multiple classes
Hello, I have been trying to use a filter on my "I am trying to create my first website"-website, the problem is when I assign 2 or more class values. The animations don't work on the proper way. I have been using http://www.jscraft.net/plugins/filters.html For an example of my problem please visit http://volhardinggoudswaard.nl/filmpje/Films.html (It's dutch) If you select "Horror" or "Kinderfilm" you will be able to see it. I hope someone can help me with my problem. I'm kinda stuck at this point
Help mixing JQuery & Mootools
I am working on a simple image gallery with a vertical filmstrip, it works fine without the jquery added, but when I added the gallery to the template (artisteer) which uses jquery, everything seems to load, but I cannot seem to get the images to swap out. any help would be appreciated. (JS is my weakness) I do a lot with php... link to view what is currently in place: http://www.tssairsoft.com/index.php?catagory=1&item=17 thankyou in advance for any / all help / suggestions. ScriptinPHP
How to duplicate function
Hi! i tried modify superfish.js - superfish menu based on JQuery. i have this function and work is great showSuperfishUl : function(){ var o = sf.op, sh = sf.c.shadowClass+'-off', $ul = this.addClass(o.hoverClass) .find('>ul:hidden').css('visibility','visible'); sf.IE7fix.call($ul); o.onBeforeShow.call($ul); $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul);
Can't get the scrollbar to work!
Hi! I'm a totally beginner here. What I want is this scrollbar: http://jscrollpane.kelvinluck.com/#download This is what I wrote in the <head>: <!-- styles needed by jScrollPane --> <link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" /> <!-- latest jQuery direct from google's CDN --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"> </script> <!-- the mousewheel plugin - optional to provide mousewheel support
blue color of such number, fax and email
hello :) please I have a little problem, I ready inserted a phone number and email to my mobile site is based on this site but I can not change the color of the following number and email still blue (just on my page index) thank you for your helps
jQuery Mobile + UI: Uncaught TypeError (1.2.0 final relesed)
I have just updated jquery mobile js to 1.2.0 final version But it gives me error on one page. Below is the error Uncaught TypeError: Object function (name, prototype) { var namespace = name.split(".")[0]; name = name.split(".")[1]; // create plugin method $.fn[name] = function(options) { var isMethodCall = (typeof options == 'string'), args = Array.prototype.slice.call(arguments, 1); // prevent calls to internal methods if (isMethodCall && options.substring(0,
programming with html() or append()
I have a question about programming style. Which code is better and why? $("#testdiv").empty().append("<div>Test 123</div>");OR $("#testdiv").html("<div>Test 123</div>"); ? In my case i need to clear the node before i insert it, so i would like to know which code is better or faster?
ajax part is executed only once in HOVERCARD....(help us)
here i m having a hovercard example. i m retrieving a text from a webservice and appending it to the div "name" on the hovercard. (here ajax part executes only for the first label in the page. Rest of the labels hovercard are blank ) Ur help is really appreciated... ============================================================================= script part : ===================================================== $(document).ready(function () { var hoverHTMLDemoAjax = '<div id="name"></div>';
Multiple div elements with data-role "page" in memory
Hi I have a strange situation with the pages (data-role=page) which are stored in memory while navigating through the pages of a JQuery Mobile application. Please take a look at the attached sample HTML pages (HTML_pages.pdf). If I open index.html in my browser and take a look at the page elements using the debugger, I will see the corresponding div defined with the "page" data-role (see Debugger.pdf). Then, if I navigate to index2.html and take a look again into the debugger, I can see two div
Create vertical menu with jQuery to show some of submenus
Hi, I'm trying to create a vertical menu using jQuery, my menu has too much submenus. I want to show only three submenus at a time, when I point at the last item, submenu moves down and next one appear. now because I have to show only three submenu, the first item must be hidden. some thing like this, happen for first item in showed sub menus. when the sub menus move up, the last item must be hidden. I'm really get confused. I'm still new to jQuery so any suggestions will be greatly appreciated.
effect mouseMove
hello, wanted to make an effect that hover at a certain position of an image and displayed other images, the effect I want to do is here: www.dafiti.com.br If anyone has an idea how to do, could you help me?
[jQuery] .find() not working on <link> node in XML document
I've got a semantic XML document, for which I'm using $.get successfully to extract <title> and <description> nodes. The <link> node does not work, however. It returns blank. Strange, since I can see in Firebug that $(this) has 4 children, and link is in there. Here's the code: $(data).find('item').each(function() { var title = $(this).find('title').text(); var url = $(this).find('link').text(); var description = $(this).find('description').text(); }); Even stranger, when I change the node name from
Jquery form field masking with default value that doesn't match the mask?
Does anyone know of a form field masking plugin or script that allows the field to have a default value that doesn't match the mask? For example, a text field that says "Phone" initially. When you click in it, "Phone" disappears, and it says "(___)___-____", which fills in as you type, like "(123)456-7890". I've written a script that will show/clear the default value, and I've found plugins that will allow masking, but I'm not sure how to combine the two.
Odd behaviour: I can't use data from .get unless I put it in an alert first!
Argghh, I'm suffering from some odd problem in my code. I'm trying to grab a chunk of html from a shared folder within the domain, and insert it into a dialog box call that I'm building on-the-fly. I've got this code running: $('.helpfaq').live('click', function () { var pageContents = ''; var message = '<div style="display: block; width: 100%; font-family: arial,helvetica,sans-serif; font-weight: normal; font-size: 9pt; color:#212121;">'; $.get('shared/faq.htm', function
using Time Picker
I want to use TimeRange feature of this plugin http://keith-wood.name/timeEntry.html I am able to use this in simple form, but i am not able to do Time Range feature Please help My code is below for TimeRange $('.timeRange').timeEntry({ beforeShow: customRange }); function customRange(input) { return { minTime: (input.id == 'timeTo' ? $('#timeFrom').timeEntry('getTime') : null), maxTime: (input.id == 'timeFrom' ? $('#timeTo').timeEntry('getTime') : null)
how do i refresh a page without actually reloading it-
hi everyone how do i refresh my page without actually reloading it. i have just built a 'login form' that logs a user in ,without actually reloading the page. The only problem is that i actaully need to refresh the page so that the 'USER Session Variables' can kick in. Is there a way to do that . i enclose below my login script $(".buttonb").click(function(e) { e.preventDefault(); // validate and process form // first hide any error messages
color fax and phone number and email!
hello :) please I heve a little problem, I ready inserted a phone number and email to my mobile site is based on this site but I can not change the color of the following number and email still blue (just on my page index) thank you for your helps
ie7, ie8 slideUp() problems
Did a quick search and couldn't find anything specific to my problem, it works in all browsers apart from ie7 and ie8 where it is not sliding, I can only imagine it has something to do with the div in question having its height set inline and not in a stylesheet. Any ideas on how to get around this or for the function to reconise the height it has been given?
Validate Plugin - Form submitted to server side with a blank value but passing client side rules
Hi All, I'm using the jQuery validate plugin (v 1.9) for a contact form on a site. The contact form is really simple, 3 fields, name (input), email(input), enquiry(textarea). The form has on a few occasions been allowed to submit (passing the client side rules) but not providing a value to the server side for the email field. I'm confident there is no issue passing the data (as it works 99% of the time) and also that these aren't hacky/bot/js disabled attempts, as the rest of the content is legitimate,
Slide not working propertly
Hi, I am trying to use slider using JQuery, some how it works but not properly. On first click it moves very fast, but next click onwards it works perfectly. This is my HTML <div class="knowledge-slide-menu"> <ul> <li class="mainli active"> <div class="slide-menu-content"> <div class="slideMenuContent"> <ul> <li><a href="#">Procedures</a></li> <li><a href="#">Arrivals Procedures</a></li>
Get ajax response with extra space
I have write same jquery ajax function on two different pages. In one page I got "Hi" and another page " Hi". why this extra space before Hi? see my code below jQuery.ajax({ type:"POST", data:"pid="+pid, url:"mypage.php", success:function(html){ });In mypage.php page echo "Hi"; I don't understand what happened ? How to get rid of it ?
Jquery mobile photoswipe on rubyonrails
I am setting up a photoswipe with jquery mobile on the rubyonrails server, for some reason, the photoswipe only start after refresh the page, but when I put the script of the page to normal website, it will working fine. Anyone can tell me what way I can make it work without refreshing please: site add: http://prod.computersforpeople.info/users/262/properties/47198 when you click on the photo, it will link to the photoswipe page, but it won't start until you refresh the page.
Div cloned has wrong behavior while refreshing nested select
I'm using the .clone() function of jQuery Mobile to clone a div in a form so I can have repeatable sections, but now I have a problem with nested selects. Once the div is cloned and the nested selects are updated with the new id, something strange happens after the next 'refresh'. What happens is very strange, the select just double and place itself inside the existing select, so the result is this: The browser is Safari, I've not made any test with other browser because I only need this code working
Need help with JQuery..
I can't seems to open/run my jquery file for 3 days now and keeps me wondering what sort of my problem is. Just last week i can hover, slidetoggle, and other effects with the page i created. I presumed i'm correct with the code that i had: <script type="text/javascript" src="jquery/jquery.js"></script> <script type="text/javascript" src="jquery/menu.js"></script> and my code for the menu.js.... $(document).ready(function() { $('.menu').hover(function() { $('.submenu').slideToggle(); });
How to deal with multiple scripts in a single page web application
Am new to Web development and i started an application where i have index.php with a menu and a div called #content and i load all the different pages in to the div #content using load(); I need to load the respective java script files along with the files that are being loaded in to the div #content. Issue: Here in the HTML's that is loaded in to the div, i have some similar class names and id's so when i click on any menu item and perform some action there and go to another menu item and perform
jQuery mobile 1.2 release date
When we likely to have jQuery Mobile 1.2 for production?
Superfish IE9 problem
I’m having a nightmare with the Superfish menu in IE9..I’m using images for the top level navigation but I don’t see that being a problem because it all worked fine until recently (month or so ago) Some of the website pages look fine on my version of IE9 but for others it’s all over the place throughout the site with triple height navigation. Firefox etc is still fine. URL of the site is http://www.globalenvironmental.co.uk/index.html Would really appreciate some help..I’ve search forum after forum
Next Page