How do I shrink a centered table to fit its contents and still be centered?
suppose I have a table centered using the (obsolete) center tags. The contents of this table are radio-buttons that are added dynamically with Javascript. My problem is that these radio-buttons sometimes have several words of text associated with each choice, and sometimes only a few. So if I have really big table with fixed width, it will look OK for long text, but not if the maximum text over all radios is only two or three words. In the latter case, the radios will be on the far left side of
ajax timer function
Hi Time for another challenge. I want to implement a timer that calls a jquery funtion every 30 seconds. I have found this example on the internet: setInterval(function() { alert('Next alert in 30 secs'); }, 5000); //5 seconds How is it included in a my html / Jquery script ? Something like this? $(document).ready(function () { setInterval(function() { alert('Next alert in 30 secs'); }, 5000); //5 seconds });
Can I have two data-roll="footer" sections on 1 page
... <div data-role="page"> <div data-role="header"> <h3>header</h3> </div> <div data-role="content"> My page content </div> <div data-role="footer"> Copyright 2013 blah blah blah </div> <div data-role="footer" data-position="fixed" id="foot_stat"> 3 - New Messages </div> </div> ... I want to use the second data-role="footer" as a status page to be displayed when my users have a new message. I want to
Making local variable global
Hello, I have this code: <!DOCTYPE html> <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script> $(document).ready(function(){ //var myd=""; // I want this to contain the contents of data $("button").click(function(){ $.get("pictures.json",function(data,status){ console.log( data ); // This does contain data }); }); // console.log( myd ); // This results in error but I want myd to contain data from the $.get }); </script>
Problem with jQuery Mobile dialog
I have a jQuery Mobile script which works but involves different dialog boxes for each time a numeric value is required from the user. So I tried to use one dialog box for all numeric values: <div data-role="dialog" id="dialogNum" data-theme="a"> <div data-role="header"><h1>Decimal Coordinates</h1></div> <div data-role="content"> <p id="inputDesc"></p> <input type="number" id="myNumber" data-mini="true" value="" /> <a href="#" data-rel="back" data-role="button">Enter</a> </div>
How choose a specific theme for an Widget
Hello! I wish use the table colum toggle, but if I not import the theme, the widget does not work well. But when I add the theme, my bootstrap navbar changes too, and I do not want it. How to import only the css for a specific widget? Like table colum toggle, or Grids.
Jquery Conflicts - How to resolve?
Hi there ! I am working on HTML and Jquery part for this website http://englishonmobile.in/newwebsite/EOM-Ver3/eom.html, here in this page, the 3 tabs are working i.e. Business English, Course and Benefits. But the top tab "TRY FOR FREE NOW" not working as like in other pages. This is the jquery issues i.e <!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>--> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Animate offset().left with hash change jQuery
'm working on horizontal scrolling website Website (blueprint) working very well, animation work smooth and everythings fine. But when I want to add window.location.hash with ba-hashchange plugin in this case does not work. $(document).ready(function(){ $("nav").delegate("a", "click", function(event) { window.location.hash = $(this).attr("href"); return false; }); var newHash = ""; $(window).bind('hashchange', function(){ newHash = window.location.hash; if (newHash) { $('body,html').stop().animate({
jquery mobile css not apply on ios
I have created a sample page in which i have used the jquery mobile .js and css , and it works really great in browsers, mobile browsers , BUT the CSS doesn't apply on the Iphone Please tell me any option to this.
cleanup api of jquery
Is there any jquery api to clean up jquery related staff of a element and its decendants without altering the dom? I am using a stupid approach: $(element).find("*").addBack().off().removeData()
[jQuery] explain this please
So for school i had to make an imagemap with jQuery, but now we have to explain it to the teacher and i dont really know how it works. So if somebody could explain it to me that would be great <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>GIP 6e IB</title> <link rel="shortcut icon" href="../afbeeldingen/favicon.ico"
How to show youtube channel videos with corresponding text using jquery??
i am able to show the youtube videos using jquery-youtube-carousel.........but how can i show the title related to it for the main video.. http://www.michaelouellette.com/jquery-youtube-carousel/ As main videos chnage the title should also change plz suggets.
How to control window traits only at URL target document?
My job involves digital publishing for print/paper magazines. For the Web, I convert pages into SWF (Flash) files for display in a proprietary player. The mobile device app version uses PNGs. Neither the player or app can be modified except by Development, which doesn't want to mess with this: customers are asking for a way to click a hyperlink and get a pop-up that shows video or an image. The challenge here is that I need to center or otherwise position the pop-ups, as well as control their size.
Confusion with the defination of :first-of-type Selector
I am very new to jQuery. I am not getting the below css rule. :first-of-type Selector - The :first-of-type selector matches elements that have no other element with both the same parent and the same element name coming before it in the document tree. The above bold part I am not getting. Can anyone help me the above with an example? Thanks, Arup
jqeury on click css add percentage value
Hi, I'd like to add 100% to margin left on click. So say my current margin value is 100% Then On click = 200% On second click = 300% and so on... How do I do this? I searched all over, can't find a solution. It's easy to add 100 pixels but i need percentage value.
Mobile UI How to add 6 th column in the NavBar
hi, I am using the jQuery mobile NavBar. How to add 6 th column in the NavBar. Pls post your comments.
Image gallery not working... help!
/* I want to create a photo gallery to display my project images. The scenario is like this... Thumbnails, each represnting a project, are displayed vertically one below the other on the left of the page. Each project can have multiple images. All images are stored in folders/directories on the web server. When you click on a thumbnail on the left, the first image of that project, by default, should be displayed enlarged on the right, with thumbnails of all the respective project images being displayed
Jquery Slideshow working in FIREFOX, SAFARI... not GOOGLE CHROME!?
Can anyone please help me? I have a gallery on my website that plays fine in firefox and safari, but for some reason it won't load in Google Chrome... any ideas? https://vibefree.com/gallery.html ty
get the width not max width
hi , i have written a plugin that create a black box when user want to see a notification or warning or sth like this , what ever , im creating some elements in this plugin . like the container and the close_btn and the content insed of it . i didnt put any width for the content element i just set min-width and max-width . when i want to centerlize the content div element i use this block of code var bodywidth = $('body').width(); bodywidth = bodywidth/2; var elementwidth = $('#'+elementwidth).width();
unable to show in browser using ajax
hi i am new to jQuery mobile my code is working in iphone/ipad simulator but not working in any browser my code is <!DOCTYPE HTML> <head> <meta charset="utf-8" /> <title>My first jQuery Mobile code</title> <meta name="viewport" content="width=device-width, initial- scale=1"> <link rel="stylesheet" href="JQM/jquery.mobile-1.3.1.css" /> <script type="text/javascript" src="JQUERY/jquery-1.9.1.js"></script> <script type="text/javascript" src="JQM/jquery.mobile-1.3.1.js"></script>
Jquery is not getting triggered after Ajax call....
Hi All, I have a following scenario : 1) I have a div container with some elements and an anchor tag is in it For Eg: <div class="mainContainer"> <!--Content-1 --> <ul> <li><a href="#">Link-1</a></li> <li><a href="#">Link-2</a></li> <li><a href="#">Link-3</a></li> </ul> </div> Now i have a click function associated with the anchor tag (And i kept the function in a seperate Javascript file $(document).ready(function(){ $('.mainContainer
List view from JSON open in InApp Browser
Hey all, I use JSON to list the latest posts from my website in listview for jquery mobile in a iPhone app that uses phonegap. When the user clicks the link I want it to open in the InApp browser of phonegap but cannot get it to work!! The .ajax call is working and a list is being created with the <a> links. Below is the bit that isn't working even though it's similar to a button example that does work on my app elsewhere This does NOT work: $('#datasales').append("<li><a href='#' data-role='button'
Delegation Troubles
jQuery 1.7.2 -- trying to convert bound events to delegation, but having trouble. This code is working: $(document).ready(function() { $(".itemLabel").change(function() { var theLabel = this.value; var railsRoute = $(this).data('route'); $.post(railsRoute, {_method: "put", label: theLabel} ); }); }); However, this does not. Actually, it works identical to the code above in that it works for all existing .itemLabel elements, but not for any new ones added the page is originally rendered.
datepicker (jQuery UI) serverside processing (asp.net)
How can i proces the selected date without a submit button? I am using the inline presentation with "populate alternate field". Because i want to keep the calender visible I have used the Alternate field in my hope to use the textbox events but to no avail. (textchange is handled "in between posts", so i need a postback ). the Alternate field is not necessary for the solution. Other question for same problem: what events are at my disposal when using a <DIV>. l <div> Date: <div
Event when an object is added to a sortable?
I have a sortable that sometimes has elements added to it dynamically. The new elements are sortable out of the box. The trouble I am having is that I do some work when the order of the sortable has changed (using the stop event). I would like to also run this code when a new element is added to the sortable, but I can't seem to figure out how to determine when that happens. I would add the code into the new element code instead, but I am using a plugin to handle that and I don't really want to muck
A simple example of how to use Jquery deferred progress callback with a Jquery UI progress bar for real-time updates
Javascript ----------------- <script type="text/javascript"> var countUpTimer; var countUp_number = -10; var deferred = $.Deferred(); var promise = deferred.promise(); $(document).ready(function () { $("#progressbar").progressbar(); $("#fail").click(function () { deferred.reject(); }); function result() { alert("Done!"); } function failed() { $("#progressbar").css({
Show all jquery results
I slowly and shakily created code that loops and displays a list of several results. I know it works because if I use document.write in the script, it shows all the results. However, when I try to get it to display in a html textarea, only the last result is display. How can I get them all to display in the html? ---------------------------- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <!-- changed from 1.4.2 --> <script type="text/javascript">
How i can fore a function after $.mobile.changePage ?
Hi i have a button in my page with class="editing_team" . When i click on this button i change page via script with $.mobile.changePage and fire a function that populate the page. This is the script: $(document).on('click','.editing_team',function(){ var id_team = $(this).attr('data-id'); var nome_team = $(this).attr('data-name'); $(".counter_formazione").html('0'); $.mobile.changePage ($("#editteam")), list_team_edit(id_team,nome_team) }); The script work good except for a issue. Apparently,
How To Access All Anchor Tags In Jquery (or any repeated nested tag)
This really more of an "accessing all of the nested anchor tags" issue. I have a html structure like this: <div id="old-posts"> <div class="toggler" style="margin-top:20px;"> <div id="effect-5498" class="ui-widget-content ui-corner-all effect"> <div class="user-name">ibanks</div> <p>some text..</p> <div class="date-created">May 30, 2013 12:00 pm</div> <div class="like-dislike-area"> <div class="command-area"> <div class="like">
table sort default by desc
Hi, records are displayed within table and currently default by asc. How can i make it default by desc ? Thanks <script type="text/javascript"> $(document).ready(function() { $("#jobtable").tablesorter({ // sort on the first column and third column, order asc sortList: [[0,0]] }); }); </script>
Audio stops playing when iphone goes to sleep
I have a mobile app created with jquery mobile and compiled for ios with phonegap. If an audio file is playing, when the phone goes to sleep, or the top button is pressed, the audio stops playing, but resumes when awakened. Is there a way to force the audio to keep playing when the device goes inactive? Thank you.
Why does wrapping large groups of elements before insertion increase performance?
JSFiddle example What I'm interested in is an explanation of why the Third Method completes in less than half the time as the Second Method, when the only difference between the two is that, in the Third Method, there's a div element wrapped around the string that contains the 1000 divs to insert. I've seen this tip mentioned all over the place, but I have yet to see a reason WHY using a wrapper is faster. var arrLen = 1000; var arr = [arrLen]; for(var i=0; i<arrLen; i++) { arr[i] = i; } Second
Simplemodal is blank!
I have started getting intermittent issues where simplemodal dialog contents are blank this tends an issue only in production. I have proved that the RegisterStartupScript call is passing the parameters correctly when the problem occurs. When the problem occurs the modal spans the entire width of the page and hides the close button - the users are stuck until they move off the page. thinking it might be a timing issue I tried putting in a delay before displaying the modal with window.setTimeout.
Font face change
I just download you theme and it has really helped me a lot on the project am caring out. But when i added the accordion and tab widget to my page. It change my entire font size. Please i need help? How can i maintain my original font size. Thanks
Polulate checkbox with hibernate list
Hi All, Please help me in populating the checkbox list using the list I got from hibernate. Thank you. Regards Raj
Autocomplete with jquery json. Why this error heppens????
The program works on local but not works on server.Why?????? [WebMethod] public List<string> GetAutoCompleteData(string prefixText) { ... Server Error in '/' Application. Unknown web method GetAutoCompleteData. Parameter name: methodName Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Unknown web method
Panel doesn't work anymore after ajax pageload
I've got a default jQuery-mobile setup with a panel on the right. It works correctly until i navigate to a other page. The panel won't show anymore with: $( "#mypanel" ).panel( "open" ); This although the html of the panel is there. All the pages loaded contain the panel html.
1.3.x no longer passes URL Parameters
I'm not sure what has changed, but in version 1.1.x you could pass a simple link such as #divname?id=foo and retrieve the parameter value of id. In 1.3.x it seems the jQuery is stripping anything other than the page bookmark, so I had to revert back to 1.1.x rather than rewriting a bunch of code. What happened?? Is this going to be fixed? The following function is an example of what's going on. the data-url string no longer contains any parameters. $.extend({getUrlVars:function(){var a=[],b;var
jQuery fortune teller not talking
After taking some jQuery lessons, I have attempted to write my first program - a simple fortune teller program. You ask a question (right now for love, happiness or money) and the program takes the question, splits it into an array and then loops through the words for a keyword. Depending on the keyword, one of ten random answers is returned. The problem I am having is that sometimes it gives the answer but only for a split second and then resets itself, or sometimes the h1 text where the answers
Need help in jQuery Prev & Next nutton
Hi, I am very new in jQuery. My client wants to update the slider he is using in his site http://www.hambastegimeli.com. I've added the Next & Previous buttons. But can't make those workable. Can anyone tell me how can I make it workable? Thanks Prasun
Next Page