Search Results

Search found 23820 results on 953 pages for 'jquery ui autocomplete'.

Page 116/953 | < Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >

  • implement jquery Plugin add method Validation

    - by Eyla
    I have a problem to use jquery Plugin/Validation. I want to add a method and follow the documentation but I think I still missing some thing. First I add the method but I think I have a problem to implement it. please check my code and advice me. <script src="js/jquery-1.4.1.js" type="text/javascript"></script> <script src="js/jquery.validate.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { jQuery.validator.addMethod("domain", function(value, element) { return this.optional(element) || /^http:\/\/yahoo.com/.test(value); }, "Please specify the correct domain for your documents"); $("#aspForm").validate(); }); <asp:TextBox ID="TextBox1" runat="server" CssClass="domain" ></asp:TextBox> </script>

    Read the article

  • jquery - DOM traversal question

    - by David
    Hi, Basically what I have here is a button that adds a new list item to an unordered list. Within this list item is a dropdown box (.formSelector) that when changed triggers an ajax call to get the values for another dropdown box (.fieldSelector) in the same list item. The problem is on this line: $(this).closest(".fieldSelector").append( If I change it to $(".fieldSelector").append( the second box updates correctly. The problem with this is that when I have multiple list items it updates every dropdown box on the page with the class fieldSelector, which is undesirable. How can I traverse the DOM to just pick the fieldSelector in the current list item? Any help is greatly appreciated. Complete code: $("button", "#newReportElement").click(function() { $("#reportElements").append("<li class=\"ui-state-default\"> <span class=\"test ui-icon ui-icon-arrowthick-2-n-s \"></span><span class=\"ui-icon ui-icon-trash deleteRange \"></span> <select name=\"form[]\" class=\"formSelector\"><? foreach ($forms->result() as $row) { echo "<option value='$row->formId'>$row->name</option>"; }?></select><select class=\"fieldSelector\" name=\"field[]\"></select></li>"); $(".deleteRange").button(); $('.formSelector').change(function() { var id = $(this).val(); var url = "<? echo site_url("report/formfields");?>" + "/" + id; var atext = "ids:"; $.getJSON(url, function(data){ $.each(data.items, function(i,item){ $(this).closest(".fieldSelector").append( $('<option></option>').val(item.formId).html(item.formLabel) ); }); }); }); return false; });

    Read the article

  • call function inside a nested jquery plugin

    - by tchoesang
    There are many topics related to my question and i have been through most of them, but i haven't got it right. The closest post to my question is the following: http://stackoverflow.com/questions/1042072/how-to-call-functions-that-are-nested-inside-a-jquery-plugin Below is the jquery plugin i am using. On resize, the element sizes are recalculated. I am now trying to call the function resizeBind() from outside of the jquery plugin and it gives me error I tried the following combinations to call the function $.fn.splitter().resizeBind() $.fn.splitter.resizeBind() Any ideas, where i am getting wrong? ;(function($){ $.fn.splitter = function(args){ //Other functions ...... $(window).bind("resize", function(){ resizeBind(); }); function resizeBind(){ var top = splitter.offset().top; var wh = $(window).height(); var ww = $(window).width(); var sh = 0; // scrollbar height if (ww <0 && !jQuery.browser.msie ) sh = 17; var footer = parseInt($("#footer").css("height")) || 26; splitter.css("height", wh-top-footer-sh+"px"); $("#tabsRight").css("height", splitter.height()-30+"px"); $(".contentTabs").css("height", splitter.height()-70+"px"); } return this.each(function() { }); }; })(jQuery);

    Read the article

  • Loading jQuery gallery after the Ajax call

    - by TiiMoo
    I am trying to put a jQuery gallery after the Ajax call. On my main site, I create a div which wrap the main content (e.g site_content). When users click on one of the hyperlink on the main page, the "site_content" will get updated and display other content which is saved at other HTML file and I am using AJAX to avoid the whole page refresh. However I having a problem of running the JavaScript/jQuery gallery because the JavaScript won't work after the AJAX call. I understand that because the browser does not know there will be some functions to call after the content (from the other HTML file) is successfully displayed. I tried to use the jQuery getScript method but it is still not working. Could anyone give me some ideas how can I run the javaScript/jQuery gallery after the AJAX call? Thanks

    Read the article

  • Why is order important in moving from tab to tab programmatically (and new in 1.8.10

    - by Bruce
    Hi folks, Up until I updated to jquery-ui-1.8.10 (already using jQuery 1.5), the following code has worked as expected: case 'baseeditor': $('#tab1').html(responseText).fadeIn(500, function() { ... load the contents of the tab and stuff... }); $("#prolearn").tabs("select",1); break; case ... The tab is fueled and then focus is moved from tab0 (from where the ajax call is initiated) to tab1. Now, that code won't work, but this version does: case 'baseeditor': $("#prolearn").tabs("select",1); $('#tab1').html(responseText).fadeIn(500, function() { ... load the contents of the tab and stuff... }); break; case ... Can someone explain the difference - have I just been lucky getting away with my original version? Thanks/Bruce

    Read the article

  • Jquery Mobile 1.2 Multiple Checkbox Selection Issue

    - by user1819957
    I'm coding a Jquery Mobile 1.2, Jquery 1.8.2, css, and HTML 5 based app that I need to allow the user to select multiple images and execute a command. The following works if I do NOT use the jquery.mobile-1.2.0.min.js library: CSS Code: .image-checkbox-container input[type="checkbox"]{ display: none; } .image-checkbox-container img{ border: 0; margin: 4px; } HTML: JQuery: $('.image-checkbox-container img').live('click', function(){ if(!$(this).prev('input[type="checkbox"]').prop("checked")){ $(this).prev('input[type="checkbox"]').prop("checked", true); this.style.border = '4px solid #38A'; this.style.margin = '0px'; }else{ $(this).prev('input[type="checkbox"]').prop("checked", false); this.style.border = '0'; this.style.margin = '4px'; } }); As soon as I add in the jquery.mobile-1.2.0.min.js library to the code it does not function correctly anymore. The unchecking/unselecting of the checkboxes does not work. I attempted to use the checkboxradio("refresh") but did not have any luck. Any suggestions would be much appreciated. Thanks

    Read the article

  • jQuery template and Backbone.js

    - by testndtv
    I am trying to create an app which uses a combination of jQuery templates and Backbone.js I have very little experience in both of them (though I know jQuery) Could you please provide some good examples where jQuery templates and Backbone.js are used effectively. Also I am loooking at using JSON for the model/data and trying to persist the data (I use Java at the backend)..So looking for ideas on how that can be integrated? Thank you.

    Read the article

  • jQuery: Get <td>'s html only

    - by Poku
    Hey, i have this code. It returns all the td code including the td /td tags. I want it to only return the content/html of the td <td>Hey</td> should give me just Hey   jQuery("#ReportTable", html).each(function (index, tr) { arr[index] = jQuery("tbody tr", tr).map(function (index, td) { return jQuery(td).html(); }); });

    Read the article

  • Change jQuery slider option dynamically based on window width

    - by Nathan
    I would like to change a jQuery option based on window width (on load as well as on resize). I've found solutions close to what I need, but I don't understand jQuery or javascript enough to customize them for my needs. Here's my jQuery code: <script type="text/javascript"> var tpj = jQuery; tpj.noConflict(); tpj(document).ready(function () { if (tpj.fn.cssOriginal != undefined) tpj.fn.css = tpj.fn.cssOriginal; tpj('#rev_slider_1_1').show().revolution({ delay: 5000, startwidth: 1920, startheight: 515, hideThumbs: 200, thumbWidth: 100, thumbHeight: 50, thumbAmount: 4, navigationType: "bullet", navigationArrows: "verticalcentered", navigationStyle: "navbar", touchenabled: "on", onHoverStop: "off", navOffsetHorizontal: 0, navOffsetVertical: 20, shadow: 0, fullWidth: "on" }); }); //ready </script> I want to change the startheight based on window width. If the window width is above 1280 I would like the value for the height to be 515, and if it is below 1280 I would like the height to be 615 and if the width is less than 480 make the height 715. With help from another post I am able to change the css I need using this script: $(window).on('load resize', function () { var w = $(window).width(); $("#rev_slider_1_1 #rev_slider_1_1_wrapper") .css('max-height', w > 1280 ? 515 : w > 480 ? 615 : 715); }); But I need to also change the jQuery startheight value on the fly. Can someone help? Thanks!

    Read the article

  • Convert DOMElement Array to jQuery Object

    - by Tim N
    I am using the DataTables plugin for jQuery and need to get one of the table rows. DataTables has a fnGetNodes function that returns an Array with all of the DOMElements of the table. I would like to use a jQuery selector to find that row (I know the id of the row), but I need to convert the Array to a jQuery Object, is this possible?

    Read the article

  • jquery select divs with same id

    - by mark
    hei guys i want to select two divs with the same id in jquery. how do i do it? i tried this and it did not work jQuery('#xx').each(function(ind,obj){ //do stuff; }); i have jquery countdown timers in a page, and i update them via ajax. some of these countdown timers repeat and that is why i need to use the same id on the divs.

    Read the article

  • sending full form data to back end using jquery

    - by pradeep
    i have a form that is dynamically built. so the number of form elements arr not fixed. I wnat to send whole of $_POSt data from the form using jquery to back end for processing .i cant use jquery form plugin as the jquery version i am using is old. any other way ? i tied to do like this $.post('all_include_files/update_save.php',{variable:"<?php echo json_encode($_POST) ?>"},function(data) { alert(data); }) but did not work

    Read the article

  • What browser incompatibilities does jquery solve?

    - by pd1138
    I'm currently on the fence about using or not using jquery. I've spent hours researching the pros and cons of using jquery (or any library for that matter). One of the big selling points of jquery is that it frees a developer from worrying about browser incompatibilities. I've tried to find any documentation on exactly which incompatibilities it overcomes. So far I haven't found any. Can anyone help me out with this.

    Read the article

  • jQuery.get() - Practical uses?

    - by RedWolves
    I am trying to understand why you would use jQuery.get() and jQuery.get(index). The docs say it is to convert the jQuery selection to the raw DOM object instead of working with the selection as a jQuery object and the methods available to it. So a quick example: $("div").get(0).innerHTML; is the same as: $("div").html(); Obviously this is a bad example but I am struggling to figure when you would use .get(). Can you help me understand when I would use this method in my code?

    Read the article

  • jquery script to retrieve select value on click: works in Firefox, does not in Internet Explorer

    - by vatshal
    hi vatshal here; I am using a jquery script in which I am getting the current value of a select box on mouse click; it works on Mozila Firefox but doesn't work in Internet Explorer onclick in IE shows previous value from the select box id <select> <option>value1</option> <option>value2</option> </select> if we are clicking on value2 then jquery gets the value of the first element, but it is working on mozila firefox only; jquery code is given below: <script type="text/javascript" src="jquery-1.4.2.js"></script> <script type="text/javascript"> $(function(){ $("#multiple").click(function(){ var a=$("#multiple").val(); $("#to").val(a); }); }); </script> Please help me

    Read the article

  • object consisting of jQuery element

    - by Adam Kiss
    hello, current code I've built function to do something over collection of jQuery elements: var collection = $([]); //empty collection I add them with: collection = collection.add(e); and remove with: collection = collection.not(e); It's pretty straightforward solution, works nicely. problem Now, I would like to have an object consisting of various settings set to any jQuery element, i.e.: function addObject(e){ var o = { alpha: .6 //float base: {r: 255, g: 255, b: 255} //color object } e.data('settings', o); } But when I pass jQuery object/element to function (i.e. as e), calling e.data doesn't work, although it would be simplest and really nice solution. question If I have an "collection" of jQuery elements, what is the simplest way of storing some data for each element of set?

    Read the article

  • Jquery on new Window objects?

    - by Poku
    Hey, Is it possible to use jQuery on a new Window javascript object? Example: win = new Window(); jQuery(win).ready(function(){ do jQuery stuff on the new window here?? }); Is something like this possible?

    Read the article

  • JQuery within a partial view not being called

    - by XN16
    I have a view that has some jQuery to load a partial view (via a button click) into a div in the view. This works without a problem. However within the partial view I have a very similar bit of jQuery that will load another partial view into a div in the first partial view, but this isn't working, it almost seems like the jQuery in the first partial view isn't being loaded. I have tried searching for solutions, but I haven't managed to find an answer. I have also re-created the jQuery function in a @Ajax.ActionLink which works fine, however I am trying to avoid the Microsoft helpers as I am trying to learn jQuery. Here is the first partial view which contains the jQuery that doesn't seem to work, it also contains the @Ajax.ActionLink that does work: @model MyProject.ViewModels.AddressIndexViewModel <script> $(".viewContacts").click(function () { $.ajax({ url: '@Url.Action("CustomerAddressContacts", "Customer")', type: 'POST', data: { addressID: $(this).attr('data-addressid') }, cache: false, success: function (result) { $("#customerAddressContactsPartial-" + $(this).attr('data-addressid')) .html(result); }, error: function () { alert("error"); } }); return false; }); </script> <table class="customers" style="width: 100%"> <tr> <th style="width: 25%"> Name </th> <th style="width: 25%"> Actions </th> </tr> </table> @foreach (Address item in Model.Addresses) { <table style="width: 100%; border-top: none"> <tr id="[email protected]"> <td style="width: 25%; border-top: none"> @Html.DisplayFor(modelItem => item.Name) </td> <td style="width: 25%; border-top: none"> <a href="#" class="viewContacts standardbutton" data-addressid="@item.AddressID">ContactsJQ</a> @Ajax.ActionLink("Contacts", "CustomerAddressContacts", "Customer", new { addressID = item.AddressID }, new AjaxOptions { UpdateTargetId = "customerAddressContactsPartial-" + @item.AddressID, HttpMethod = "POST" }, new { @class = "standardbutton"}) </td> </tr> </table> <div id="[email protected]"></div> } If someone could explain what I am doing wrong here and how to fix it then I would be very grateful. Thanks very much.

    Read the article

  • Call inner function of jQuery-Plugin-function?

    - by faileN
    Hello Everyone, I've written an jQuery-Plugin, which I want to use as Object. So I declared some functions within the plugin, which I want to call from any other location, just like an object with methods. Is that even possible? To keep it simple: (function( $ ){ $.fn.myPlugin = function(){ // Here I want methods... function foo() { // do something... } } })(jQuery); Then I want to call the inner function from outside the plugin like: $.myPlugin.foo(); But that doesn't seem to work. So is it even possible? Or are there any other solutions? I don't want to use an normal unrelated jQuery-Class for this purpose. Because this plugin should work together with some other jQuery-Plugins. Thank you

    Read the article

  • jQuery animate opacity doesn't work properly on IE

    - by fidoboy
    I'm trying to use animate function to change the height and opacity for a DIV. The div has a image background in CSS, it works fine on Firefox and Safari, but when i test it on IE the background is being removed. This is my code: if (jQuery.support.opacity) { jQuery('#list_box').animate({opacity: '1',height: '300px',top: newTop},{duration: 300}); } else { jQuery('#list_box').animate({filter: 'alpha(opacity=100)',height: '300px',top: newTop},{duration: 300}); } How can i fix it?

    Read the article

  • Having trouble with multiple Jquery libraries

    - by user3716971
    I've seen the posts about the no conflict but I'm not very code savvy and can't figure it out alone. I'm having trouble making two libraries work together. At the top I have the 1.9.1 library which controls a news ticker, and a carousel. Near the bottom there is a library 1.6.1, which controls a Dribbble feed. If I remove 1.6.1 everything but the dribbble feed works, and if I remove the 1.9.1 the dribbble feed is the only thing that works. I uploaded the website for you guys to check out. If you could edit my code to make it work that would be amazing, I don't have much knowledge of jquery. This version has a working dribbble feed at the very bottom http://michaelcullenbenson.com/MichaelCullenBenson.com/index.html and this version has a broken feed and everything else works. http://michaelcullenbenson.com/MichaelCullenBenson.com/index2.html Help would be AMAZING as the dribbble feed is the last element I'm trying to finish on my homepage and I'll be able to move on. <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="js/jquery.innerfade.js"></script> <script type="text/javascript"> $(document).ready( function(){ $('#news').innerfade({ animationtype: 'slide', speed: 600, timeout: 6000, type: 'random', containerheight: '1em' }); }); </script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="utilcarousel-files/utilcarousel/jquery.utilcarousel.min.js"></script> <script src="utilcarousel-files/magnific-popup/jquery.magnific-popup.js"></script> <script src="js/responsive-nav.js"></script> <script> $(function() { $('#fullwidth').utilCarousel({ breakPoints : [[600, 1], [800, 2], [1000, 3], [1300, 4],], mouseWheel : false, rewind : true, autoPlay : true, pagination : false }); $('#fullwidth2').utilCarousel({ breakPoints : [[600, 1], [800, 2], [1000, 3], [1300, 4],], mouseWheel : false, rewind : true, autoPlay : true, pagination : false }); }); </script> <script> $(document).ready(function() { var movementStrength = 25; var height = movementStrength / $(window).height(); var width = movementStrength / $(window).width(); $("#aboutarea").mousemove(function(e){ var pageX = e.pageX - ($(window).width() / 2); var pageY = e.pageY - ($(window).height() / 2); var newvalueX = width * pageX * -1 - 25; var newvalueY = height * pageY * -1 - 50; $('#aboutarea').css("background-position", newvalueX+"px "+newvalueY+"px"); }); }); </script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script> <script type="text/javascript" src="dribbble.js"></script> <script type="text/javascript"> $(function () { $('#user').dribbble({ player: 'MCBDesign', total: 1 }); }); </script>

    Read the article

< Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >