Search Results

Search found 23364 results on 935 pages for 'jquery ui droppable'.

Page 81/935 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • How do I get selected date set by jQuery UI Datepicker

    - by Steven
    I'm setting the start date of an event using jQuery UI Datepicker. Now I need to retrieve the date I selected. I'm trying to use $('#startDate').datepicker('getDate'), but this returns NULL. Using FirBug, I see that the input value is nothing <input type="text" name="startDate" value="" id="startDate" class="hasDatepicker"> I'm able to retrieve selected date when using jQuery serialize. So how can I retrieve the selected date?

    Read the article

  • How to retrieve parent container ID after sorting using Jquery sortable??

    - by user187580
    Hello I have following markup and javascript to sort some items. Items can be sorted within a block or across other blocks. It works but I have a problem in retrieving correct block ID after an item is moved from one block to another. For example, if I move item 1 within "Block 1", I get "I am in Block= block_1" but if I move Item 1 to Block 2 I still get I am in Block 1. But I want to make the block 2 as its parent container. I need to retrieve this id so that I can do some ajax and update the db accordingly. Can you please help me correct this?? <div id="blocks_sortable"> <div id="block_1"> <h2>Block 1</h2> <div class="items_sortable connectedSortable"> <div id="item_1"> <span>Item 1</span></div> <div id="item_2"> <span>Item 2</span></div> <div id="item_3"> <span>Item 3</span></div> </div> </div> <div id="block_2"> <h2>Block 2</h2> <div class="items_sortable connectedSortable"> <div id="item_4"> <span>Item 4</span></div> <div id="item_5"> <span>Item 5</span></div> <div id="item_6"> <span>Item 6</span></div> </div> </div> </div> <script> $("#blocks_sortable").sortable({ }); $(".items_sortable").sortable({ connectWith: '.connectedSortable' , forcePlaceholderSize: true , stop : function(event, ui){ alert("I am in block = "+$(this).parent().attr("id")); } }).disableSelection(); </script> Thank you.

    Read the article

  • jquery event namespace bubbling issue

    - by Adrian Adkison
    Hi, I stumbled upon an issue with event namespacing while developing a jQuery plugin. here is the html <div class="parent"> <div class="child"> </div> </div> <a class="btn-a">trigger a</a> <a class="btn-b">trigger b</a> <a class="btn-c">trigger c</a> Here is the jQuery jQuery('#content div.child') .bind('child.a',function(){alert('a-child');}) .bind('child.b',function(){alert('b-child');}) .bind('child.c',function(){alert('c-child');}); jQuery('#content div.parent') .bind('child.b',function(){alert('b-parent');}) .bind('child.c',function(){alert('c-parent');}); jQuery('a.btn-a') .click(function(){ jQuery('#content div.child').trigger('a.a'); }); jQuery('a.btn-b') .click(function(){ jQuery('#content div.child').trigger('a.b'); }); jQuery('a.btn-c') .click(function(){ jQuery('#content div.child').trigger('a.c'); }); In sum, I have attached a namespaced event listener to the child and parent and created three buttons that trigger each of the events(a.a, a.b, a.c). Note the parent is only listening to a.b and a.c. When I click on the button that triggers a.a on the child, only the div.child listener for a.a is fired, but the entire 'a' namespace event bubbles up to div.parent listeners, a.b and a.c, and triggers them. My question is, how would I still use event namespacing but only have the intended event bubble up(i.e. a.a is the only event that fires for both child and parent). I am aware of stopPropagation and stopImmediatePropagation. I would not want to put these on the child a.b and a.c listeners because there are times when i do want them to bubble. For instance when I trigger 'a.b' on the child, I would expect the 'a.b' and only the 'a.b' event to be handled by the child and the parent. Thanks

    Read the article

  • Need help with jquery ui slider

    - by Gandalf StormCrow
    I'm trying to create this slider http://jqueryui.com/demos/slider/#rangemax Is it possible to parametrize the max value? For ex: $("#slider-range-max").slider({ range: "max", min: 1, max: maxValue, value: 2, slide: function(event, ui) { $("#amount").val(ui.value); } }); Is it possible to pass maxValue value, when I click on something ?After its been initialized? not on document ready function, after that?

    Read the article

  • Add rel="xx" to jQuery a.link elements

    - by Xavier
    I use a little jQuery script to run a simple music player, but I'd like to add a rel="player" to the links in this jQuery script (the play/stop button for instance). This way I can exclude these rel="player" links from another jQuery script I use, because I don't want it to take the rel="player" elements into account. I reckon this is fair simple but i don't really know how to to it. Here is the jQuery script of the player, if it's ever necessary: http://hyker.be/cv/js/jquery.simpleplayer.min.js

    Read the article

  • jQuery MVC architecture

    - by Tomas Barbak
    Hi, what is the best way to create MVC architecture in jQuery? Should I use jQuery.extend()? jQuery.extend({ View: function(){} }); ...or jQuery Plugin? (function($) { $.fn.model = function() { return this; }; })(jQuery); ...or just objects in JavaScript? var model = {} var view = {} var controller = {} Thank you!

    Read the article

  • Internet Explorer does NOT respect jQuery's slideDown effect

    - by Fayaz Mammoo
    I Use internet explorer and last version of jquery. effetcs like slidedown, fadein, fadeout dont work with ie but works good with Google Chrome. How to fix it? Code runs fine in Google Chrome: jQuery.noConflict(); jQuery(document).ready(function(){ jQuery("#form1").hide(); jQuery("#form1").fadeIn(6000, function() { // Animation complete.form1:mainHome:panelGroup2 }); });

    Read the article

  • Why this jquery plugin not working with 1.4.2

    - by metal-gear-solid
    http://plugins.jquery.com/project/semantictabs What is the means of this Status - Recommended for 1.0.x I'm using this plugin code as it is http://plugins.jquery.com/files/jquery.semantictabs.js_4.txt then this ( I'm also using prototype.js onsite) jQuery.noConflict(); jQuery(document).ready(function(){ $("#mytabset").semantictabs({ panel:'.mypanelclass', //-- Selector of individual panel body head:'headelement', //-- Selector of element containing panel header, i.e. h3 active:':first' //-- Which panel to activate by default }); });

    Read the article

  • How could i get selected value from dropdownlist in kendo ui grid in mvc

    - by Karthik Bammidi
    I am working on Kendo UI with asp.net mvc razor. I am trying to bind database table data with kendo grid that supports CRUD operations. Here i need to populate a dropdownlist for one of my table field. I have used the following code View: @model IEnumerable<MvcApplication1.PriceOption> @(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { //columns.Bound(p => p.ProductTitle).ClientTemplate("<input type='checkbox' disabled='disabled'name='Discontinued' <#= Discontinued? checked='checked' : '' #> />"); columns.Bound(p => p.ProductTitle).EditorTemplateName("OptionalEmail"); columns.Bound(p => p.OptionTitle); columns.Bound(p => p.Price); columns.Bound(p => p.Frequency); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200); }) .ToolBar(toolbar => toolbar.Create()) .Editable(editable => editable.Mode(Kendo.Mvc.UI.GridEditMode.InLine)) .Pageable() .Sortable() .Scrollable() .DataSource(dataSource => dataSource .Ajax() .Events(events => events.Error("error_handler")) .Model(model => model.Id(p => p.ProductID)) .Create(create => create.Action("CreateOption", "ZiceAdmin")) .Read(read => read.Action("Read", "ZiceAdmin")) .Update(update => update.Action("UpdateOption", "ZiceAdmin")) .Destroy(update => update.Action("DeleteOption", "ZiceAdmin")) ) ) OptionalEmail.cshtml @model string @(Html.Kendo().DropDownList() .Name("ProductTitle") .Value(Model) .SelectedIndex(0) .BindTo(new SelectList(ViewBag.ProductTitle)) ) Here i need to store the selected item from the dropdownlist. But it always shows null. How could i get the selected value from dropdownlist.

    Read the article

  • jQuery UI Dialog pass on variables

    - by Dante
    Hi, I'm creating a Web interface for a table in Mysql and want to use jQuery dialog for input and edit. I have the following code to start from: $("#content_new").dialog({ autoOpen: false, height: 350, width: 300, modal: true, buttons: { 'Create an account': function() { alert('add this product'); }, Cancel: function() { $(this).dialog('close'); $.validationEngine.closePrompt(".formError",true); } }, closeText: "Sluiten", title: "Voeg een nieuw product toe", open: function(ev, ui) { /* get the id and fill in the boxes */ }, close: function(ev, ui) { $.validationEngine.closePrompt(".formError",true); } }); $("#newproduct").click(function(){ $("#content_new").dialog('open'); }); $(".editproduct").click(function(){ var test = this.id; alert("id = " + test); }); So when a link with the class 'editproduct' is clicked it gets the id from that product and I want it to get to the open function of my dialog. Am I on the right track and can someone help me getting that variable there. Thanks in advance.

    Read the article

  • jQuery AJAX request (Rails 3) gets redirected and returns empty message body (only with SSL)!

    - by elsurudo
    I'm trying to do a manual jQuery AJAX request the following way: $("#user_plan_id").change(function() { $("#plan_container").load('/plans/' + this.value); }); I have the "rails.js" file included in my header, and a "<%= csrf_meta_tag %". I see from my log that the request IS getting to the server (although without the authenticity token... does rails.js even do this?), but the response is a 302 (Found) rather than 200, and no data actually gets rendered. Any ideas? Edit: I now see that the first request redirects, and the proper partial gets rendered on the redirect. However, the 2nd response's body (on the client-side) is still empty. I'm guessing jQuery uses the first response and doesn't have a listener set up for the redirect. How do I get around this? Also, another note: the page doing the requesting is an HTTPS page. Here is what my log says: Started GET "/plans/221168073" for 127.0.0.1 at Tue Jun 15 01:24:06 -0400 2010 Processing by PlansController#show as HTML Parameters: {"id"=>"221168073"} DEPRECATION WARNING: Using #request_uri is deprecated. Use fullpath instead. (called from ensure_proper_protocol at /Users/ernestsurudo/Sites/vidfolia/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb:57) Redirected to http://vidfolia.com/plans/221168073 Completed 302 Found in 1ms It turns out that if I turn off SSL requirement for that page, it works! I still have no idea why, though. So I suppose my question is: what is the workaround?

    Read the article

  • How should I write Jquery Mobile app for browsers with and without javascript support?

    - by Adrian Grigore
    Hi, I'm trying to wrap my head around jQuery Mobile. My aim is to build a very fast application with a look and feel as close as possible to a native app (at least for modern devices). I understand there are two ways of navigating between pages: Loading each page as a separate page and linking to other pages with regular html anchors. Putting all (or many) pages on one single web page and navigating between them by means of javascript ($.mobile.changePage (method) and similar api functions. The first approach should work on all browsers, but performs quite poorly since there is a delay between each page transition. The second looks like it should be much faster, so I would definitely prefer this approach. But how would that work for mobile device browsers without javascript support? It certainly seems to violate jQuery Mobile's aim to provide a gracefully degraded experience for C-grade browsers. It looks to me like I need to implement my app twice, once optimized for browsers with javascript support, once for browsers without? Using may be another option, but that looks even more messy. What's the recommended way to approach this dilemma? Is there anything I have not noticed? Thanks, Adrian

    Read the article

  • Can I copy/clone a function in JavaScript?

    - by Craig Stuntz
    I'm using jQuery with the validators plugin. I would like to replace the "required" validator with one of my own. This is easy: jQuery.validator.addMethod("required", function(value, element, param) { return myRequired(value, element, param); }, jQuery.validator.messages.required); So far, so good. This works just fine. But what I really want to do is call my function in some cases, and the default validator for the rest. Unfortunately, this turns out to be recursive: jQuery.validator.addMethod("required", function(value, element, param) { // handle comboboxes with empty guids if (someTest(element)) { return myRequired(value, element, param); } return jQuery.validator.methods.required(value, element, param); }, jQuery.validator.messages.required); I looked at the source code for the validators, and the default implementation of "required" is defined as an anonymous method at jQuery.validator.messages.required. So there is no other (non-anonymous) reference to the function that I can use. Storing a reference to the function externally before calling addMethod and calling the default validator via that reference makes no difference. What I really need to do is to be able to copy the default required validator function by value instead of by reference. But after quite a bit of searching, I can't figure out how to do that. Is it possible? If it's impossible, then I can copy the source for the original function. But that creates a maintenance problem, and I would rather not do that unless there is no "better way."

    Read the article

  • JQuery idleTimeout plugin: How to display the dialog after the session is timedout on ASP.NET MVC Pa

    - by Rita
    Hi I am working on migrating the ASP.NET apllication to MVC Framework. I have implemented session timeout for InActiveUser using JQuery idleTimeout plugin. I have set idletime for 30 min as below in my Master Page. So that After the user session is timedout of 30 Min, an Auto Logout dialog shows for couple of seconds and says that "You are about to be signed out due to Inactivity" Now after this once the user is logged out and redirected to Home Page. Here i again want to show a Dialog and should stay there saying "You are Logged out" until the user clicks on it. Here is my code in Master page: $(document).ready(function() { var SEC = 1000; var MIN = 60 * SEC; // http://philpalmieri.com/2009/09/jquery-session-auto-timeout-with-prompt/ <% if(HttpContext.Current.User.Identity.IsAuthenticated) {%> $(document).idleTimeout({ inactivity: 30 * MIN, noconfirm : 30 * SEC, redirect_url: '/Account/Logout', sessionAlive: 0, // 30000, //10 Minutes click_reset: true, alive_url: '', logout_url: '' }); <%} %> } Logout() Method in Account Controller: public virtual ActionResult Logout() { FormsAuthentication.SignOut(); return RedirectToAction(MVC.Home.Default()); } Appreciate your responses.

    Read the article

  • jQuery AJAX request (Rails 3) gets redirected and returns empty message body!

    - by elsurudo
    I'm trying to do a manual jQuery AJAX request the following way: $("#user_plan_id").change(function() { $("#plan_container").load('/plans/' + this.value); }); I have the "rails.js" file included in my header, and a "<%= csrf_meta_tag %". I see from my log that the request IS getting to the server (although without the authenticity token... does rails.js even do this?), but the response is a 302 (Found) rather than 200, and no data actually gets rendered. Any ideas? Edit: I now see that the first request redirects, and the proper partial gets rendered on the redirect. However, the 2nd response's body (on the client-side) is still empty. I'm guessing jQuery uses the first response and doesn't have a listener set up for the redirect. How do I get around this? Also, another note: the page doing the requesting is an HTTPS page. Here is what my log says: Started GET "/plans/221168073" for 127.0.0.1 at Tue Jun 15 01:24:06 -0400 2010 Processing by PlansController#show as HTML Parameters: {"id"=>"221168073"} DEPRECATION WARNING: Using #request_uri is deprecated. Use fullpath instead. (called from ensure_proper_protocol at /Users/ernestsurudo/Sites/vidfolia/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb:57) Redirected to http://vidfolia.com/plans/221168073 Completed 302 Found in 1ms Perhaps it has something to do with the deprecation warning?

    Read the article

  • jQuery: how to create a new div, assign some attributes, and create an id from some other elements a

    - by Ronedog
    jQuery: how to create a new div, assign some attributes, and create an id from some other elements attributes? How can I accomplish this. What I've tried below is not working and I'm unsure how to make it work. What I'm trying to do is create a div and assign it some attributes, then append this div to all the < li elements that are the on the last node of my unordered list. And lastly, but most important I want to retrieve the value of the attribute called "p_node" from the < li that is being appended to and insert it in as part of the ID of the newly created div. Here's my current jQuery code: $('<div />,{id:"'+ $("#nav li:not(:has(li))").attr("p_node").val() +'_p_cont_div", class:"property_position"}').appendTo("#nav li:not(:has(li))"); Here's the HTML before the div creation: <ul> <li p_node="98" class="page_name">Category A</li> </ul> <ul> <li p_node="99" class="page_name">Category B</li> </ul> Here's what I want it to look like after the new div creation: <ul> <li p_node="98" class="page_name">Category A</li> <div id="98_p_cont_div" class="property_position"></div> </ul> <ul> <li p_node="99" class="page_name">Category B</li> <div id="99_p_cont_div" class="property_position"></div> </ul>

    Read the article

  • How to have multiple instances of jQuery plugin on single page?

    - by James Skidmore
    I'm writing a simple jQuery plugin, but I'm having trouble being able to use multiple instances on a page. For instance, here is a sample plugin to illustrate my point: (function($) { $.fn.samplePlugin = function(options) { if (typeof foo != 'undefined') { alert('Already defined!'); } else { var foo = 'bar'; } }; })(jQuery); And then if I do this: $(document).ready(function(){ $('#myDiv').samplePlugin({}); // does nothing $('#myDiv2').samplePlugion({}); // alerts "Already defined!" }); This is obviously an over-simplified example to get across the point. So my question is, how do I have two separate instances of the plugin? I'd like to be able to use it across multiple instances on the same page. I'm guessing that part of the problem might be with defining the variables in a global scope. How can I define them unique to that instance of the plugin then? Thank you for your guidance!

    Read the article

  • Why is my jQuery event not being triggered when the button is clicked?

    - by Ankur
    I am trying to call the .ajax() method when a button with id=go is clicked. This button is displayed when another jQuery event is triggered, namely that a button with a class called predicate is clicked. The button with id=go is displayed without any problems but on clicking it, there is no call to the alert() or getResults() method which are supposed to occur. Howver if I hard code the button with id=go into the page and don't have it generated by jQuery then the thing works fine. Why does the generated code cause a problem. $(document).ready( function() { $(".predicate").click( function() { makeQuery(this.id); //alert(this.id); }); $(".object").click( function() { //alert(this.id); }); var variables = 0; var queryString = ""; var noOfResults; var formValues=""; var goBegin = ""; var goEnd = "<br/><input name='go' id='go' type='button' value='go'/>"; function makeQuery(value) { queryString = queryString + "val" + variables + "=" + value + "&"; formValues=formValues+"<input type='hidden' name='val"+variables+"' value='"+value+"' />"; variables = variables + 1; $("#resultCount").html(goBegin+formValues+queryString+goEnd); } function getResults(){ $.ajax( { type : "GET", url : "ObjectCount", data : queryString + "count=" + variables, success : function(results) { noOfResults = results; $("#resultCount").html(results - 1 + " results"); } }); } $("#go").click( function() { alert("We have been alerted"); getResults(); }); });

    Read the article

  • How to refresh jQuery Selector Value after an execution?

    - by Devyn
    Hi, I have like this. $(document).ready(function() { var $clickable_pieces = $('.chess_piece').parent(); $($clickable_pieces).addClass('selectee'); // add selectee class var $selectee = $('.chess_square.selectee'); // wait for click $($selectee).bind('click',function(){ $('.chess_square.selected').removeClass('selected'); $(this).addClass('selected'); { ........... } }); I initially inject 'selectee' class to all div which has 'chess_piece' class then I select DIVs with that class $('.chess_square.selectee'). <div id="clickable"> <div id="div1" class="chess_square"> </div> <div id="div2" class="chess_square selectee"> <div id="sub1" class="chess_piece queen"></div> </div> <div id="div3" class="chess_square"> </div> </div> There are two type of DIV element with class named 'chess_square selectee' and 'chess_square' which doesn't meant to be clickable. I move around Sub DIV of 'rps_square selectee' from DIV2 to DIV1 and add and remove classes to be exactly same like this. The meaning is Queen Piece is moved from Div2 to Div1. <div id="div1" class="chess_square selectee"> <div id="sub1" class="chess_piece queen"></div> </div> <div id="div2" class="chess_square"> </div> <div id="div3" class="chess_square"> </div> However, the problem is jQuery doesn't update var $selectee = $('.rps_square.selectee');. Even though I changed class names, DIV1 is not clickable and DIV2 is still clickable. By the way, I've used jQuery UI selectable but doesn't refresh either.

    Read the article

  • Rewriting jQuery to plain old javascript - are the performance gains worth it?

    - by Swader
    Since jQuery is an incredibly easy and banal library, I've developed a rather complex project fairly quickly with it. The entire interface is jQuery based, and memory is cleaned regularly to maintain optimum performance. Everything works very well in Firefox, and exceptionally so in Chrome (other browsers are of no concern for me as this is not a commercial or publicly available product). What I'm wondering now is - since pure plain old javascript is really not a complicated language to master, would it be performance enhancing to rewrite the whole thing in plain old JS, and if so, how much of a boost would you expect to get from it? If the answers prove positive enough, I'll go ahead and do it, run a benchmark and report back with the precise findings. Cheers Edit: Thanks guys, valuable insight. The purpose was not to "re-invent the wheel" - it was just for experience and personal improvement. Just because something exists, doesn't mean you shouldn't explore it into greater detail, know how it works or try to recreate it. This is the same reason I seldom use frameworks, I would much rather use my own code and iron it out and gain massive experience doing it, than start off by using someone else's code, regardless of how ironed out it is. Anyway, won't be doing it, thanks for saving me the effort :)

    Read the article

  • Jquery Dialog - Is there a way to open it without registering it using .dialog?

    - by Raja
    This is my problem. I have a page with multiple tabs. I load those tabs dynamically and one of those tabs is a message container (mail). Every time I click a folder link (Inbox, Sent Mail etc) I reload just that tab alone with appropriate content. I use Jquery dialog to pick contacts and I have to load contacts everytime. Since I reload the whole tab content every time JQuery Dialog registers (or creates) the whole div content. To avoid this I did this: if ($("#ui-dialog-title-divContacts").length == 0) { //if dialog data is not created then make dialog $("#divContacts").dialog({ bgiframe: true, resizable: false, autoOpen: false, height: 600, width: 425, modal: true, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { Cancel: function () { //basically do nothing $(this).dialog("close"); }, 'Done': function () { $("#divTo").empty().html($("#divSelectedContacts").html()); $(this).dialog("close"); } } }); } I went to generated viewsource in FF and found that only one instance is being created. My problem now is it is not showing the dialog. Is there a way by which I can open this dialog without registering it. Any help is much appreciated.

    Read the article

  • How to get jQuery to find the first list-item, rather than all list-items?

    - by ricebowl
    I'm trying to implement a basic jQuery infinite carousel. As much for the learning process as for anything else (as a rule I'm not a fan of re-inventing wheels, but...I have to learn somehow, might as well start with the basics). I've managed to get the list to animate left happily enough, but I'm stuck when it comes to selecting the first element of the list. I've tried to use: $('ul#services > li:first'); $('ul#services > li:first-child'); $('ul#services > li').eq([0]); (xhtml below), In each case a console.log(first) (the var name used) returns all of the list-items. Am I doing something blatantly, and obviously, wrong? The eventual plan is to clone the first li, append it to the parent ul, remove the li from the list and allow the list to scroll infinitely. It's just a list of services rather than links so I'm not -at the moment- planning to have scroll or left/right functionality. Current xhtml: <div class="wrapper"> <ul id="services"> <!-- closing the `</li>` tags on the following line is to remove whitespace in the horizontal list, doesn't seem to make a difference to the jQuery from my own testing. --> <li>one</li ><li>two</li ><li>three</li ><li>four</li ><li>five</li ><li>six</li ><li>seven</li ><li>eight</li ><li>nine</li ><li>ten</li> </ul> </div>

    Read the article

  • jQuery Mobile: How to run a callback-function before $.mobile.changePage?

    - by Jugi84
    I'm setting up a mobile app with jQuery Mobile and PhoneGap. What I want to do is that when I click link with id "news_link" I want jQuery to fetch data from database and put it to jQm's collapsible set. In my solution, I've wanted to use $.mobile.changePage inside callback functions because I want to wait until the data has been fetched and put inside the container before the code changes page. Here's the code: $(function() { $('#news_link').click(function(){ loadNewsFromDB(function(){ $.mobile.changePage( $("#news"), { transition: "slideup"} ); }); }); loadNewsFromDB is PhoneGap's SQLite database function which would fetch the data with more callback functions from database. The contents would be put to desired container with .html-function function loadNewsFromDB(){ //some code here theDB.transaction(function(tx) { tx.executeSql(sqlStr, [], onLoadNewsSuccess, onLoadNewsError); },onTxError, onTxSuccess); function onLoadNewsSuccess(tx, results){ //some code here $("#newsSet").html(htmlCodeAndContentToPut); Html is jQm's basic ui-modules: <!-- some html code here --!> <div data-role="page" id="news"> <div data-role="content"> <div id="newsSet" data-role="collapsible-set" data-mini="true"> With debugging I know that the code work up until it works very well unti it arrives to $.mobile.changePage-function. Somehow it doesn't change the page. I've checked the function it works well in other occasions, but not inside callback-functions. I would be very grateful if someone would give me a hand am I not seeing something obviously wrong or is something more specific? What other workarounds there is for fetching the data from SQLite, waiting for data to be fetched, putting the data to container and then changing the pages?

    Read the article

  • How to delete the first child of an element but referenced by $(this) in Jquery?

    - by Raja
    The scenario is I have two Divs one is where I select items (divResults) and it goes to the next div (divSelectedContacts). When I select it I place a tick mark next to it. What I want to do is when I select it again I want to remove the tick mark and also remove the element from divSelectedContacts. Here is the code. $("#divResults li").click(function() { if ($(this).find('span').size() == 1) { var copyElement = $(this).children().clone(); $(this).children().prepend("<span class='ui-icon ui-icon-check checked' style='float:left'></span>"); $("#divSelectedContacts").append(copyElement); } else { var deleteElement = $(this).find('span'); //here is the problem how to find the first span and delete it $(deleteElement).remove(); var copyElement = $(this).children().clone();//get the child element $("#divSelectedContacts").find(copyElement).remove(); //remove that element by finding it } }); I don't know how to select the first span in a li using $(this). Any help is much appreciated.

    Read the article

  • Does a jQuery selector by id always work without quotes and # sign?

    - by anarinsky
    I suddenly found that while using Mozilla / jQuery v1.8.2 I do not need to use the id with quotes and # sign. For example, $(bt2) works the same as $(“#bt2”), see the code below. Will this selector always work and are there any potential drawbacks from using this shorter form of selection? <html> <head> <title>append</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready (function(){ $(bt2).click(function(){ $(i1).append("<li>a4</li>", "<li>a5</li>"); }); }); </script> </head> <body> <button id="Button1">Append List</button> <ul id="i1"> <li>a1</li> </ul> </body> </html>

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >