Adding images to icons?
Hi, I am new to jquery mobile how can i add icon or images to buttons in jquery mobile.please help. Thanks & Regards, Nithya
how to detect user has clicked back button
how do i detect user has clicked back button of browser and i want to prevent it from redirecting to back page i dont want to disable the back button
Can I use other js with jQuery Mobile
I got a html page ... with this js but how can I use it together with jQuery Mobile Regards ------------------------------------------------------------------------------------------------------------------- <!-- Include javascript files --> <!-- Latest jQuery framework --> <script type="text/javascript" src="js/jquery.min.js" ></script> <!-- Plugin for scaling images in the posts --> <script type="text/javascript" src="js/jquery.jScale.js" ></script> <!-- A custom jQueriy
Calling ASP.NET codebehind function from Jquery or making Jquery window modal?
I'm working on a .NET-based (VB) collections program. There is a page in the system where users set up new cases, and at several points on this page they are taken to a different page to define certain selections on the case, causing us to save a partial record before navigating away to the next page. I want to warn them of this and give them the chance to continue or cancel. If they select continue a function in the codebehind file is run. If they select cancel I just want the Jquery warning
dosnt get parameters in code behind.
Hi, I am new to JQuery as well as this forum. I am stuked in a problem. I have to create a modal in my code which basically consist of search functionality.I used the inbuild JQery to create that ,I am adding button in my Div and on submit of that button I want the control goes to function that i have created on code behind. <div id="dialog_test" class="divSearchDialog" style="display: none" > <table width="100%" id="tblSearch" class="tblDragSearch"> <MW:MWButton ID="btnTest" runat="server" Text="Test"
Fetching the entire Tree structure on click of submit button.
Hello All, I am using TreeView plugin of jquery, while using this i came to a bit of problem. What I want to do is get the entire tree structure, on click of submit button by user. This is required as in my case user can change the tree structure and this changes can be saved. For saving the changes I need to access the entire Treestructure. Waiting for a quick reply. P.S: Using jQTreeView (jquery.treeview.js) Regards, Rushabh D. Vipani.
re-starting after stop()
How to re-start an animation after it's been stopped ? function breathe() { { breatheIn(); setTimeout('breatheOut()',6400); } setTimeout( function() { breathe() }, 19200); } components: function breatheIn() { $('#bg1').animate({opacity:"1.0"}, 3200); } function breatheOut() { $('#bg1').animate({opacity:"0.0"}, 6400); } stop: function stopBr() { $("#bg1").stop().fadeOut(1200); } A second call doesn't work: <a href="#" onclick="breathe();">restart</a> also tried onclick="breatheIn();
Yet Another attribute selector problem, where value has backslashes (ala full domain name, "DOMAIN\user")
I have searched this forum, Google, numerous boards, and my increasingly shrinking brain and I can't understand why this is happening. Consider the following (edited for brevity): <DIV id="divCurrentUsers"> <DIV UserLogin="CMS Admin">CMS Admin</DIV> <DIV UserLogin="MYDOMAIN\juser">Joe User</DIV> </DIV> Sanity Check: $("#divCurrentUsers>div")[0].outerHTML "<DIV UserLogin="CMS Admin">CMS Admin</DIV>" $("#divCurrentUsers>div")[1].outerHTML "<DIV UserLogin="MYDOMAIN\juser">Joe User</DIV>" That's
Unable to configure the UI Accordion
I copied the accordion code from the jquery UI documentation into a new .html file and the accordion works. But when I replace the text in one of the divs with a larger paragraph, not all of the text is shown when that div is opened. Instead, it's cut off and a scroll bar is provided at the right of the window to see the rest of the text. I tried defeating this behavior by inserting the jQuery line $( ".selector" ).accordion({ autoHeight: false }); as the
Loaded page form submission
I project I'm working on uses jquerys load to load up pages on my site. I'm having problems using ajax forms to submit data to a .php page on these loaded pages. They tend to either not work or refresh to the defult page loaded via jquery. (document).ready(function(){ // load index page when the page loads $('#ajax-content').html('<p><img src="includes/loaderimage.gif" width="220" height="19" /></p>'); $('#ajax-topframe').html('<p><img src="includes/loaderimage.gif" width="220" height="19" /></p>');
$.post() and IE 9
Hello, I am using jquery 1.5.1 have this function function foo(section) { $.post ( "/", { task: 'section', section: section }, function(data) { alert(data); } ); which works fine for every browser on every OS except IE 9 (9.0.8112.16421). When the server returns an empty string, the popup pops up. When the server returns something, nothing happens. Any idea what the problem might be Thank you
Stop Jquery.Cycle onBefore from firing multiple times in Ajax script
I'm using Jquery cycle on images loaded with Ajax. Captions for each image are loaded with Jquery.Cycle's onBefore option and a separate function, as seen below: $('#full-wrap').cycle({ before: onBefore }); }; function onBefore() { $('.caption') .html('Opposite: ' + this.alt); }; The problem is that because the data is being loaded via Ajax, and because Jquery.Cycle is being called as a success function of the Ajax script, the caption text from
Adding jquery inside external Javascript file
Hi all, I am new to jquery, and trying to add a reference to the jquery js file inside of an external javascript file (foo.js) through a document.writeln statement: document.write('<script language="javascript" src="http://code.jquery.com/jquery-1.5.min.js"><\/script>'); The issue I am finding is that my jquery calls inside of this foo.js file result in errors. For example, adding the following jquery code to the end of foo.js results in "$ is not defined" error in chrome. Here is my jquery code
How to select all <h/> descendants of a context element, except <h/> descendants of <section/> descendants of the context
I want to select all <h/> descendants of a context element, except <h/> descendants of <section/> descendants of the context In other words, given HTML, <whatever> <section> <!-- This element is the context --> <whatever> <h>Match</h> <section> <h>Don't match</h> </section> </whatever> </section> </whatever> - and the identified context element, I want to select <h>Match</h>, but not <h>Don't match</h> Which of the following two ways is better? $('h', context).not($('section
Dynamically created .live() events appear to be bound but not firing
I've come across an issue where I've got a dynamically created popup class that despite appearing to be bound according to Visual Event does not fire on clicking the closebutton attached to it. I'm not getting any errors in firebug and by setting breakpoints I've verified we are not reaching the code to execute. Ruling out the usual suspects such as obvious spelling mistakes/ swapping out jquery versions 1.3/1.4/1.5 doesn't make any difference. Any ideas on what could be going on or where else
[solved] Can't get custom options to update from default
I have script (http://jsbin.com/ifoke5/31) that adds some extra capabilities to the dialog widget. Everything works fine on default settings but if i use the following: $('...').dialog('option', { 'scrolling': false}); the default value is still assigned //option.scrolling: auto What am i missing? ~Thanks in advance.
toggle custom theme button
Hi - How do I make my custom theme show up 1st, without having to click the toggle custom theme button to view it in its entirety ?? ex is) http://layout.jquery-dev.net/demos/layouts_inside_tabs.html Now, for example, I have my own custom theme designed from the Themeroller and it shows up when I toggle over, but i dont wanna click the toggle button for it to show up...how do i set this up? Thank you in advance - Don -
datepicker icon called via default
I have called a calendar icon file from a script on the form - this works except IE, where I get the "x" for image. I prefer to call it from the widget defaults. I have downloaded the themeroller version, including datepicker. The defaults regarding button image that came with the download are: buttonText:"",buttonImage:"",buttonImageOnly:false, I wish to change it to: buttonText:"calendar",buttonImage:"",buttonImageOnly:true, Note the missing button image from the icons png that comes with the
jQuery.validate dependancy callback
Hi I am trying to do a dependancy call back using JQuery.validate code is fieldsvalue_2: { required: function(element) { return $('#total_travellers').val() >= 2; }, dateISO: function(element) { return $('#total_travellers').val() >= 2; } } It works fine for the required: element but not for dateISO, is it not possible with dateISO or am I doing something wrong..? If its not a feature, it there any work around that would produce the same result Any help greatly appreciated. Kind Regards Paul
jQuery tabs, prevent navigating away with preventDefault() not working
Hi all, I am checking if a form on a jQuery tab is changed, and if it has, the user should get a popup warning when they navigate away from the tab with the form or click any other link on the page for that matter. So I setup this code: $('a').bind('click', function(event) { if (formChanged == true) { event.preventDefault() console.debug('prevent'); } });in the $(document).ready() function. I can see the code is executed, but
Ajax with JQuery
I am currently building a room booking web application for a school (as a school project) i currently have a index page with a div as follows: HTML Code: <div id="page_content"> </div>this area of the page is used to load in external php pages with generate contnent for a database i am currently using jquery to load the content in: Code: $('#Rooms').click(function(){ $('#page_content').load('rooms.php'); });within the rooms.php file there is a jquery datepicker the problem i am having is making the
Buttons not getting displayed
Hello, I'm pretty new to javascript and jquery/jqueryUI but of course trying to learn. In my project i'm adding some buttons that I want to display with the aid of jQueryUI, but unluckily even if to me what I did pretty resembles what's in the radio buttons demo, it still won't work at all. First of all, I of course added the css both for my page and jqueryUI: <link rel="stylesheet" type="text/css" href="css/webgeocss2.css"> <link rel="stylesheet" type="text/css" href="css/blitzer/jquery-ui-1.8.11.custom.css">
How to select every nth element from a matched set?
I know you can use :even or :odd to get the even or odd indexes from a set, or :lt/:gt to filter down the matched set before/beyond the specified index. But what if I want to select every 5th element? And I know it's not nth-child, because that selects everything that is the nth-child of it's parent and not if it is one of the nth elements in the matched set. Is the only way to use .each(function (index) {...}); and then check if the index makes that element one of the nth items? Thanks
ufvalidator and livequery
Hi, I am totally new in jquery and have question about plugins. I load into div using load() function form to send email $("#content").load('menu.html #kontakt'); the form looks like this: <section class="jquery-plugin"> <form action="" method="post" class="form" id="contactForm"> <input type="hidden" value="true" name="mailer"> <div class="form-row"> <div class="label">Name - Surname</div> <div class="input-container"><input type="text" maxlength="40" minlength="3"
Render a list once it is avaialable
Hi , I am trying to make simple JQuery application with Auto complete . I need when the user types each character --> go to server and do some logic there -->then render a list from the server . I succeeded to do that .However, the only thing that BUGS me that once the response comes from the server , I must type another character in order to be able to render the list . How could I render the list whenever it comes from the server without the need to type any thing . $(document).ready(function()
applying bind > delay > unbind - seems the delay is ignored..
applying bind > delay > unbind - seems the delay is ignored.. why is that? <html> <head> <style type="text/css"> div#button { background: red; width: 200px; height: 200px; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> var i = 0; $(function(){ $('#button').bind('click', counter).delay(10000).unbind('click',
How and where do I publish 2 developed plugins on the website "www.jquery.com" ?
hello, How and where do I publish 2 developed plugins on the website "www.jquery.com" ? I'd would like jquery user's can download free my plugins. thank,
Accordion closed initially
I would like to render my page with the accordion widget closed initially. I have cobbled this together from reading this site and trying to understand examples-it does allow all to be collapsed. But...how do I open with this? <script> $(function() { // Shorthand for $(document).ready(function() { $("#accordion").accordion({ collapsible: true }); var collapsible = $( "#accordion" ).accordion( "option", "collapsible" ); }); </script>
Timer called function on expiry but not after
Timer Plugin My goal is to have set up two youtube videos. VideoA now and VideoB Later. When the countdown finishes at 5pm I want the video to switch from A to B. Using the countdown timer I've gotten that to work. I set the timer for say 90 seconds after load and it swaps out perfectly fine. If I set the timer for 11pm tonight it will switch fine. The problem is if I set the timer for 11pm tonight and I load the page at 11:30 the timer says 0:0:0 but it doesn't activate the switch function. As per
UI Dialog : Google Chrome problem with youtube
Problem is that youtube link reloads page on chrome and not on firefox? Thanks. var link = "http://www.youtube.com/watch?v=QU5DhngJfr8" var object = '<object height="385" width="640">' + '<param value="'+link+'" name="movie">' + '<param value="true" name="allowFullScreen">' + '<param value="always" name="allowscriptaccess">' + '<embed height="385" width="640" allowfullscreen="f" allowscriptaccess="always" type="application/x-shockwave-flash" src="'+link+'">'
multiple checkbox values
Hi i have checkboxes in the below format, <input type="checkbox" name="all"> <input type="checkbox" name="all_a"> <input type="checkbox" name="a1" value="1"> <input type="checkbox" name="a2" value="2"> <input type="checkbox" name="all_b"> <input type="checkbox" name="b1" value="3"> <input type="checkbox" name="b2" value="4"> <input type="checkbox" name="all_c"> <input type="checkbox" name="c1" value="5"> <input type="checkbox" name="c2" value="6"> <input type="checkbox" name="all_d"> <input type="checkbox"
how to code a page with code?
Let me explain... I am trying to make a gui for clients to edit a php page that displays html and javascript. I want the user to be able to move html elements around and even edit it like add effects like fade in and out etc. Then after all the changes I want to overwrite the existing php file that does this for that user. how can you make such changes and then save it to a file? it's an html / javascript editor but using a gui instead of allowing them to directly touch the code. It would be a
How do I make a DB work with more than one object?
I'm trying to expand on a tutorial where Jonathan Stark creates a database using JS, CSS, and JQuery. Right now everything works fine if I have one "vehicle1" link and need to enter info for only that one link. If I add a second vehicle link, I get into problems. How do I adjust the code to allow me to enter and reveal code from a DB for multiple links? Here's a walk-through of what's going on: This link takes me to code at "date" for vehicle 1: <li><a href="#date">vehicle1</a></li> it brings me
should $(document).live() map to $(document).bind()? window, too?
right now $(document).live() seems to do nothing. it should maybe just map to .bind() instead. it's probably an issue with .live() requiring an explicit selector for filtering, but i think this is a fair exception. maybe both - "document" and "window", since they cannot be CSS-selected. minor, i know, but eh. edit: i remember there was some talk about making .ready() live as well. could be a related solution/discussion.
Problem with displaying list thumbnail list in jqmobile
Hello I have a problem with displaying thumbnail list in jqmobile. If I tried> <ul data-role="listview" > <li> <img src="images/album-bb.jpg" /> <h3><a href="index.html">Broken Bells</a></h3> <p>Broken Bells</p> </li> Is everything O.K and looks it like> http://jquerymobile.com/demos/1.0a3/docs/lists/lists-thumbnails.html But if I try generate it dynamically via $(document).ready(function () { $.ajax({ type: "GET", url: "data.xml", dataType: "xml", success:
Problems with form postbacks
Hello all, I'm wondering if anyone can help me solve my problems with jQuery Mobile. The Setup: I'm using ASP.NET to work with and have a shopping cart setup with a product page and additional options (DropDownList and Checkboxes) to add for the product before adding it to the shopping cart. I used QueryStrings to determine which product to display There is a postback every time the options are changed to update the price The Symptom: First I go to a product page for product 1, then I go to a product
Problems whit slideToggle and is(':visible')
I want to change a value tag (div class='seeMore') ("+ if hidden" & "- if show") depending on the result of the slideToggle jQuery, but I can't even make the slide work. I know that the problem lies in the way of how I call the tag to be Toggle $(this).parents('.seeMoreContainer').next().slideToggle(1000)But can not find another way to do it because there will be multiple tags with class 'seeMore', so I have to deal with the keyword '(this)' to make the action of slideToggle to that particular div-class='seeMore'
validate onsubmit help
Hi Guys, im using the validate plugin with the metadata plugin as below : jQuery(document).ready( function(){ jQuery("#com-createForm").validate({ meta: "rules" } ); }); However i want to basically call this when the form is submitted becuase the form processing take along time (pdf generation): document.getElementById('generatebutton').innerHTML='<center><b>processing</b></center>'; does anyone know how i would do this (using the validate and metadata plugin) PS i only want to show that message
Deleting multiple cookies
Have a section of code that is hiding or showing content in a filter setting. If a user moves back a week it will cookie the settings of the filter. The only bad thing is when a user un-selects a filter the cookie doesnt ignore that and puts it up on the next page even though you unselect that filter. Any help on how I take away the cookie filter if they un-select it? if ( filter.id == 'show-all' || $('#filters .selected').length < 1 ) { var d = new Date(); $( '#filters .selected'
backstretch / fancybox conflict
I am using jquery plugins on a website built in Wordpress. I find that the backstretch and fancybox plugins won't work together. If the backstretch is active, the fancybox will not work - and I've tried a number of different fancybox plugins. If I turn the backstretch off, then the fancybox plugin works fine. The include files are in different locations in my directory. Any ideas why these two plugins conflict? And how I go about getting them to work together? Thanks Tim
Next Page