Search Results

Search found 17637 results on 706 pages for 'jquery autocomplete'.

Page 21/706 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Filtering List Data with a jQuery-searchFilter Plugin

    - by Rick Strahl
    When dealing with list based data on HTML forms, filtering that data down based on a search text expression is an extremely useful feature. We’re used to search boxes on just about anything these days and HTML forms should be no different. In this post I’ll describe how you can easily filter a list down to just the elements that match text typed into a search box. It’s a pretty simple task and it’s super easy to do, but I get a surprising number of comments from developers I work with who are surprised how easy it is to hook up this sort of behavior, that I thought it’s worth a blog post. But Angular does that out of the Box, right? These days it seems everybody is raving about Angular and the rich SPA features it provides. One of the cool features of Angular is the ability to do drop dead simple filters where you can specify a filter expression as part of a looping construct and automatically have that filter applied so that only items that match the filter show. I think Angular has single handedly elevated search filters to first rate, front-row status because it’s so easy. I love using Angular myself, but Angular is not a generic solution to problems like this. For one thing, using Angular requires you to render the list data with Angular – if you have data that is server rendered or static, then Angular doesn’t work. Not all applications are client side rendered SPAs – not by a long shot, and nor do all applications need to become SPAs. Long story short, it’s pretty easy to achieve text filtering effects using jQuery (or plain JavaScript for that matter) with just a little bit of work. Let’s take a look at an example. Why Filter? Client side filtering is a very useful tool that can make it drastically easier to sift through data displayed in client side lists. In my applications I like to display scrollable lists that contain a reasonably large amount of data, rather than the classic paging style displays which tend to be painful to use. So I often display 50 or so items per ‘page’ and it’s extremely useful to be able to filter this list down. Here’s an example in my Time Trakker application where I can quickly glance at various common views of my time entries. I can see Recent Entries, Unbilled Entries, Open Entries etc and filter those down by individual customers and so forth. Each of these lists results tends to be a few pages worth of scrollable content. The following screen shot shows a filtered view of Recent Entries that match the search keyword of CellPage: As you can see in this animated GIF, the filter is applied as you type, displaying only entries that match the text anywhere inside of the text of each of the list items. This is an immediately useful feature for just about any list display and adds significant value. A few lines of jQuery The good news is that this is trivially simple using jQuery. To get an idea what this looks like, here’s the relevant page layout showing only the search box and the list layout:<div id="divItemWrapper"> <div class="time-entry"> <div class="time-entry-right"> May 11, 2014 - 7:20pm<br /> <span style='color:steelblue'>0h:40min</span><br /> <a id="btnDeleteButton" href="#" class="hoverbutton" data-id="16825"> <img src="images/remove.gif" /> </a> </div> <div class="punchedoutimg"></div> <b><a href='/TimeTrakkerWeb/punchout/16825'>Project Housekeeping</a></b><br /> <small><i>Sawgrass</i></small> </div> ... more items here </div> So we have a searchbox txtSearchPage and a bunch of DIV elements with a .time-entry CSS class attached that makes up the list of items displayed. To hook up the search filter with jQuery is merely a matter of a few lines of jQuery code hooked to the .keyup() event handler: <script type="text/javascript"> $("#txtSearchPage").keyup(function() { var search = $(this).val(); $(".time-entry").show(); if (search) $(".time-entry").not(":contains(" + search + ")").hide(); }); </script> The idea here is pretty simple: You capture the keystroke in the search box and capture the search text. Using that search text you first make all items visible and then hide all the items that don’t match. Since DOM changes are applied after a method finishes execution in JavaScript, the show and hide operations are effectively batched up and so the view changes only to the final list rather than flashing the whole list and then removing items on a slow machine. You get the desired effect of the list showing the items in question. Case Insensitive Filtering But there is one problem with the solution above: The jQuery :contains filter is case sensitive, so your search text has to match expressions explicitly which is a bit cumbersome when typing. In the screen capture above I actually cheated – I used a custom filter that provides case insensitive contains behavior. jQuery makes it really easy to create custom query filters, and so I created one called containsNoCase. Here’s the implementation of this custom filter:$.expr[":"].containsNoCase = function(el, i, m) { var search = m[3]; if (!search) return false; return new RegExp(search, "i").test($(el).text()); }; This filter can be added anywhere where page level JavaScript runs – in page script or a seperately loaded .js file.  The filter basically extends jQuery with a : expression. Filters get passed a tokenized array that contains the expression. In this case the m[3] contains the search text from inside of the brackets. A filter basically looks at the active element that is passed in and then can return true or false to determine whether the item should be matched. Here I check a regular expression that looks for the search text in the element’s text. So the code for the filter now changes to:$(".time-entry").not(":containsNoCase(" + search + ")").hide(); And voila – you now have a case insensitive search.You can play around with another simpler example using this Plunkr:http://plnkr.co/edit/hDprZ3IlC6uzwFJtgHJh?p=preview Wrapping it up in a jQuery Plug-in To make this even easier to use and so that you can more easily remember how to use this search type filter, we can wrap this logic into a small jQuery plug-in:(function($, undefined) { $.expr[":"].containsNoCase = function(el, i, m) { var search = m[3]; if (!search) return false; return new RegExp(search, "i").test($(el).text()); }; $.fn.searchFilter = function(options) { var opt = $.extend({ // target selector targetSelector: "", // number of characters before search is applied charCount: 1 }, options); return this.each(function() { var $el = $(this); $el.keyup(function() { var search = $(this).val(); var $target = $(opt.targetSelector); $target.show(); if (search && search.length >= opt.charCount) $target.not(":containsNoCase(" + search + ")").hide(); }); }); }; })(jQuery); To use this plug-in now becomes a one liner:$("#txtSearchPagePlugin").searchFilter({ targetSelector: ".time-entry", charCount: 2}) You attach the .searchFilter() plug-in to the text box you are searching and specify a targetSelector that is to be filtered. Optionally you can specify a character count at which the filter kicks in since it’s kind of useless to filter at a single character typically. Summary This is s a very easy solution to a cool user interface feature your users will thank you for. Search filtering is a simple but highly effective user interface feature, and as you’ve seen in this post it’s very simple to create this behavior with just a few lines of jQuery code. While all the cool kids are doing Angular these days, jQuery is still useful in many applications that don’t embrace the ‘everything generated in JavaScript’ paradigm. I hope this jQuery plug-in or just the raw jQuery will be useful to some of you… Resources Example on Plunker© Rick Strahl, West Wind Technologies, 2005-2014Posted in jQuery  HTML5  JavaScript   Tweet !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();

    Read the article

  • ASP.NET MVC jQuery autocomplete with url.action helper in a script included in a page.

    - by Boob
    I have been building my first ASP.NET MVC web app. I have been using the jQuery autocomplete widget in a number of places like this: <head> $("#model").autocomplete({ source: '<%= Url.Action("Model", "AutoComplete") %>' }); </head> The thing is I have this jQuery code in a number of different places through my web app. So i thought I would create a seperate javascript script (script.js) where I could put this code and then just include it in the master page. Then i can put all these repeated pieces of code in that script and just call them where I need too. So I did this. My code is shown below: In the site.js script I put this function: function doAutoComplete() { $("#model").autocomplete({ source: '<%= Url.Action("Model", "AutoComplete") %>' }); } On the page I have: <head> <script src="../../Scripts/site.js" type="text/javascript"></script> doAutoComplete(); </head> But when I do this I get an Invalid Argument exception and the autocomplete doesnt work. What am I doing wrong? Any ideas?Do i need to pass something to the doAutoComplete function?

    Read the article

  • jQuery fn.extend ({bla: function(){}} vs. jQuery.fn.bla

    - by tixrus
    OK I think I get http://stackoverflow.com/questions/1991126/difference-jquery-extend-and-jquery-fn-extend in that the general extend can extend any object, and that fn.extend is for plugin functions that can be invoked straight off the jquery object with some internal jquery voodoo. So it appears one would invoke them differently. If you use general extend to extend object obj by adding function y, then the method would attach to that object, obj.y() but if you use fn.extend then they are attach straight to the jquery object $.y().... Have I got that correct yes or no and if no what do I have wrong in my understanding? Now MY question: The book I am reading advocates using jQuery.fn.extend ({a: function(){}, b: function(){}}); syntax but in the docs it says jQuery.fn.a (function(){}); and I guess if you wanted b as well it would be jQuery.fn.b (function(){}); Are these functionally and performance-wise equivalent and if not what is the difference? Thank you very much. I am digging jQuery!

    Read the article

  • jquery lib conflicts

    - by Indranil Mutsuddy
    Hello friends, I am tryin to use jgrowl and jquery validation in the same page and each time either of them works. I ve gone through the jQuery.nonConflict but coulnt solve the problem my .cs code for jgrowl is string js = "$.jGrowl(' INVALID MEMBER ID, KINDLY TRY AGAIN ');"; Page.ClientScript.RegisterStartupScript(typeof(string), "jgrowlwarn", js, true); and in .aspx is the following libs <script src="../jquery.jgrowl.js" type="text/javascript"></script> <link href="../jquery.jgrowl.css" rel="stylesheet" type="text/css" /> whereas for validations the followin are the codes in .aspx page <link href="../ketchup.jquery.ketchup.css" rel="stylesheet" type="text/css" /> <script src="../JS/ketchup.jquery.min.js" type="text/javascript"></script> <script src="../JS/ketchup.jquery.ketchup.js" type="text/javascript"></script> <script src="../JS/ketchup.jquery.ketchup.messages.js" type="text/javascript"></script> <script src="../JS/ketchup.jquery.ketchup.validations.basic.js" type="text/javascript"></script> <script type ="text/javascript"> $(document).ready(function($) { $('#example1').ketchup(); }); </script> How to make this work? please help. Thanking you, Indranil

    Read the article

  • jQuery UI datepicker will not display - full code included

    - by Bill Brasky
    I am having trouble displaying the jQuery datepicker as shown here: http://jqueryui.com/demos/datepicker/ I believe I downloaded all of the proper files, but to be certain, I started from scratch and ripped the demo site. Not all of it, but what I believed to be the important parts. The result is no datepicker to be shown and no javascript errors. Here is my full code sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="http://static.jquery.com/ui/css/base2.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <script type="text/javascript" charset="utf-8"> jQuery(function(){ jQuery("#datepicker").datepicker(); }); </script> </head> <body> <input type="text" id="datepicker" class="hasDatepicker" /> </body> </html> Any help would be very much appreciated. Thanks!

    Read the article

  • How to bind to another event after ajax call in jquery

    - by robert
    Hi, I'm creating a graph using flot javascript library. I have enabled clickable event and the div is binded to plotclick event. So, when a datapoint is clicked, an ajax call is made and the result is used to replace the current div. After this i need to bind the div to a new event. I tried to call bind, but it is still bound to old callback. When i call unbind and bind, the new callback is not called. var handleTeacherClick = function( event, pos, item ) { if( typeof item != "undefined" && item ) { var user_id = jQuery( 'input[name="id' + item.datapoint[0] + '"]' ).val(); jQuery.ajax({ type: 'POST', url: BASEPATH + 'index.php/ajax/home/latest', data: { "user_id": user_id }, dataType: 'json', success: function ( result ) { jQuery.plot(jQuery('#stats_prog'), result.progress_data, result.progress_options); jQuery.plot(jQuery('#stats_perf'), result.performance_data, result.performance_options); jQuery('.stats_title'). html('<span class="stats_title">'+ ' >> Chapter '+Math.ceil(item.datapoint[0])+'</span>'); jQuery('#stats_prog')./*unbind("plotclick").*/ bind('plotclick', statClickHandler ); jQuery('#stats_perf')./*unbind("plotclick"). */ bind( 'plotclick', statClickHandler ); }, }); } }

    Read the article

  • jQuery autocomplete. Doesn't reveal existing matches.

    - by Alexander
    Hello fellow engineers. I have come across a problem I just can't solve. I am using autocomplete plugin for jQuery on an input. The HTML looks something like this: <tr id="row_house" class="no-display"> <td class="col_num">4</td> <td class="col_label">House Number</td> <td class="col_data"> <input type="text" title="House Number" name="house" id="house"/> <button class="pretty_button ui-state-default ui-corner-all button-finish">Get house info</button> </td> </tr> I am sure that this is the only id="house" field. Other fields that are before this one work fine with autocomplete, and it's basically the same algorithm (other variables, other data, other calls). So why doesn't it work like it should work with the following init. code: $("#house").autocomplete(["1/4","6","6/1","6/4","8","8/1","8/5","10","10/1","10/3","10/4","12","12/1","12/5","12/6","14","14/1","15","15/1","15/2","15/4","15/5","16","16/1","16/2","16/21","16/2B","16/3","16/4","17","17/1","17/2","17/4","17/5","17/6","17/7","17/8","18","18/1","18/2","18/3","18/5","18/95","19","19/1","19/2","19/3","19/4","19/5","19/6","19/7","19/8","20","20/1","20/2","20/3","20/4","21","21/1","21/2","21/3","21/4","22","22/9","23","23/2","23/4","24","24/1","24/2","24/3","24/A","25","25/1","25/10","25/2","25/4","25/5","25/6","25/7","25/8","25/9","26","26/1","26/6","27","27/2","28","28/1","29","29/2","29/3","29/4","30","30/1","30/2","30/3","31","31/1","31/3","32/A","33","34","34/1","34/11","34/2","34/3","35","35/1","35/2","35/4","36","36/1","36/A","37","37/1","37/2","38","38/1","38/2","39/1","39/2","39/3","39/4","40","40/1","41","41/2","42","43","44","45","45/1","45/10","45/11","45/12","45/13","45/14","45/15","45/16","45/17","45/2","45/3","45/6","45/7","45/8","45/9","46","47","47/2","49","49/1","50","51","51/1","51/2","52","53","54","55/7","66","109","122","190/8","412"], {minChars:1, mustMatch:true}).result(function(event, result, formatted) { var found=false; for(var index=0; index<HChouses.length; index++) //HChouses is the same array used for init, but each entry is paired with a database ID. if(HChouses[index][0]==result) { found=true; HChouseId=HChouses[index][1]; $("#row_house .button-finish").click(function() { QueryServer("HouseConnect","FillData",true,HChouseId); //this performs an AJAX request }); break; } if(!found) $("#row_house .button-finish").unbind("click"); }); Each time I start typing (say I press the "1" button), the text appears and gets deleted instantly. Rarely at all after repeated presses I get the list (although much shorter than it should be) But if after that I press the second digit, the whole thing disappears again. P.S. I use Firefox 3.6.3 for development.

    Read the article

  • how do you control the width of a jquery ui autocomplete combobox

    - by oo
    i am using this jquery ui combobox autocomplete control out of the box off the jquery ui website: my issue is that i have multiple comboboxes on a page and i want them to have different widths for each one. i can change the width for ALL of them by adding this css: .ui-autocomplete-input { width:300px; } but i can't figure out a way to change the width on just one of them

    Read the article

  • Autocomplete server-side implementation

    - by toluju
    What is a fast and efficient way to implement the server-side component for an autocomplete feature in an html input box? I am writing a service to autocomplete user queries in our web interface's main search box, and the completions are displayed in an ajax-powered dropdown. The data we are running queries against is simply a large table of concepts our system knows about, which matches roughly with the set of wikipedia page titles. For this service obviously speed is of utmost importance, as responsiveness of the web page is important to the user experience. The current implementation simply loads all concepts into memory in a sorted set, and performs a simple log(n) lookup on a user keystroke. The tailset is then used to provide additional matches beyond the closest match. The problem with this solution is that it does not scale. It currently is running up against the VM heap space limit (I've set -Xmx2g, which is about the most we can push on our 32 bit machines), and this prevents us from expanding our concept table or adding more functionality. Switching to 64-bit VMs on machines with more memory isn't an immediate option. I've been hesitant to start working on a disk-based solution as I am concerned that disk seek time will kill performance. Are there possible solutions that will let me scale better, either entirely in memory or with some fast disk-backed implementations? Edits: @Gandalf: For our use case it is important the the autocompletion is comprehensive and isn't just extra help for the user. As for what we are completing, it is a list of concept-type pairs. For example, possible entries are [("Microsoft", "Software Company"), ("Jeff Atwood", "Programmer"), ("StackOverflow.com", "Website")]. We are using Lucene for the full search once a user selects an item from the autocomplete list, but I am not yet sure Lucene would work well for the autocomplete itself. @Glen: No databases are being used here. When I'm talking about a table I just mean the structured representation of my data. @Jason Day: My original implementation to this problem was to use a Trie, but the memory bloat with that was actually worse than the sorted set due to needing a large number of object references. I'll read on the ternary search trees to see if it could be of use.

    Read the article

  • Silverlight Watermarked AutoComplete Box

    - by Steve Brouillard
    Can someone direct me to an example or explanation that will help me either: Extend the SilverLight AutoComplete Box to allow watermarks. Extend the Watermark TextBox to allow AutoComplete functionality. It strikes me that option 1 would be easiest, but I'm open. Thanks in advance.

    Read the article

  • .NET ComboBox Autocomplete failing on slashes

    - by Clyde
    The .NET ComboBox autocomplete will not fully autocomplete with the display text contains a slash. It completes only up to the slash, leaving SelectedIndex == -1 and SelectedValue == null. This behavior stupidly persists no matter whether your autocompletesource is set to ListItems rather than FileSystem or URL. Is there any workaround for this that doesn't involve just throwing the ComboBox class away and writing a "MyComboBox" class?

    Read the article

  • JQuery UI tabs: How do I navigate directly to a tab from another page?

    - by Chris Simpson
    JQuery UI tabs are implemented by named anchors in an unordered list. When you hover over one of the tabs you can see this in the link shown at the foot of the browser: http://mysite/product/3/#orders Above would be the "orders" tab for example. JQuery obviously intercepts the click to this anchor and opens the tab instead. However if I bookmark the link above or link to it from elsewhere in the site the page does not open on the specific tab. In the tab initialisation block I was considering putting in some code that looks for a named anchor in the URL and, if it finds one, does an index lookup of the tabs and calls the select on it. This would mean it will still work with JS switched off. But is there an easier/nicer/better way?

    Read the article

  • How can I set up JQuery autocomplete like Stackoverflow's tags input field?

    - by d03boy
    I'm using PHP and I've never really done anything with Javascript or JQuery or AJAX. I'm just wondering if there are any available solutions to accomplish the same effect of auto-completion that SO uses for entering tags. There are plugins which can handle one word but I haven't seen any that handles multiple words. Also, I hear JQuery is hosted on google code. Is it a good or bad idea to link directly from that?

    Read the article

  • Linking jQuery UI to the ASP.NET MVC 2 project

    - by Tx3
    What I am trying to accomplish is using jQuery UI dialog method from my own JavaScript source code file. I have this kind of links in the Site.Master <script src="/Scripts/jquery-1.4.2.js" type="text/javascript"></script> <script src="/Scripts/jquery.validate.js" type="text/javascript"></script> <script src="/Scripts/jquery-ui.js" type="text/javascript"></script> <script src="/Scripts/Common.js" type="text/javascript"></script> Common.js is my own helper file. jQuery works fine there, but when I try to call for example: $(document).ready(function() { $("#dialog").dialog(); }); I'll get "Microsoft JScript runtime error: Object doesn't support this property or method" Any ideas why this happens? jQuery Works fine, but jQuery UI doesn't.

    Read the article

  • Jquery : How to load a function after some interval or after end of another function or event

    - by Maju
    I need to run a function 'setNotifications()' after a timed delay or at the end of completion of the previous animation('#topannounce' animation).But jQuery is not running the 'setNotifications()'after the animation. What should I do? or is there a better way to run the function?Plz hlp.Thanx. Here is the jQuery I have. $('a#resetbtn').bind('click', function(){ //setNotifications(); $.cookie('notificationBar', 'open'); //$('#topannounce').animate({opacity: 1.0}, 3000).fadeIn('slow'); $('#topannounce').fadeIn('slow'); setNotifications(); }); function setNotifications() { alert("load:setNotifications..."); }

    Read the article

  • Uncaught ReferenceError: jQuery is not defined "jquery-ui.js:338"

    - by Chad Sellers
    My jquery script reference are : <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js" type="text/javascript"></script> I'm using Chrome Version 23.0.1271.64 m - And I'm getting an error on line 338 })( jQuery ); //-- line 338 is highlighted This is a 1st for me and looking for answers.

    Read the article

  • Gravity Forms not loading under https, jQuery is not defined

    - by cmykrgbb
    I am using Gravity Forms on my Wordpress site, and so far so good. The problem is I have made the page secure (https/SSL), and this is making the form not to work. It looks like the issue is how the site is trying to load jQuery. There are 23 JS errors on the page, which seem to be due to a failed jQuery load "Uncaught ReferenceError: jQuery is not defined". If I go to the page where the source is trying to pull the jQuery file, you'll see the error:https://code.jquery.com/jquery-1.7.1.min.js?ver=3.4.2 Screenshot of the error: https://www.evernote.com/shard/s212/sh/326f95d6-a498-4c33-b413-7e968225cc79/c2e380ed0fa02a913f712005c8301185 And this screenshot is the reference in the page source: https://www.evernote.com/shard/s212/sh/ae547962-c017-4321-90a2-c51433e59262/124ae116f2b803771f4eb36c90b5a524 So I have been told I'd want to look into that - that's where the ultimate issue is, but I don't really know what to do next. Is it failing because of Gravity Forms, the HTTPS plugin from Wordpress, my SSL certificate...? Thanks in advance!

    Read the article

  • Creating and Using a jQuery Plug-in in ASP.NET Web Forms

    - by bipinjoshi
    Developers often resort to code reuse techniques in their projects. As far as ASP.NET framework server side programming is concerned classes, class libraries, components, custom server controls and user controls are popular code reuse techniques. Modern ASP.NET web applications no longer restrict themselves only to server side programming. They also make use of client side scripting to render rich web forms. No wonder that Microsoft Visual Studio 2010 includes jQuery library by default as a part of newly created web site. If you are using jQuery for client side scripting then one way to reuse your client side code is to create a jQuery plug-in. Creating a plug-in allows you to bundle your reusable jQuery code in a neat way and then reuse it across web forms. In this article you will learn how to create a simple jQuery plug-in from scratch. You will also learn about certain guidelines that help you build professional jQuery plug-ins.http://www.bipinjoshi.net/articles/aae84a03-b4a8-477d-b087-5b7f42935220.aspx 

    Read the article

  • Methodology to understanding JQuery plugin & API's developed by third parties

    - by Taoist
    I have a question about third party created JQuery plug ins and API's and the methodology for understanding them. Recently I downloaded the JQuery Masonry/Infinite scroll plug in and I couldn't figure out how to configure it based on the instructions. So I downloaded a fully developed demo, then manually deleted everything that wouldn't break the functionality. The code that was left allowed me to understand the plug in much greater detail than the documentation. I'm now having a similar issue with a plug in called JQuery knob. http://anthonyterrien.com/knob/ If you look at the JQuery Knob readme file it says this is working code: $(function() { $('.dial') .trigger( 'configure', { "min":10, "max":40, "fgColor":"#FF0000", "skin":"tron", "cursor":true } ); }); But as far as I can tell it isn't at all. The read me also says the Plug in uses Canvas. I am wondering if I am suppose to wrap this code in a canvas context or if this functionality is already part of the plug in. I know this kind of "question" might not fit in here but I'm a bit confused on the assumptions around reading these kinds of documentation and thought I would post the query regardless. Curious to see if this is due to my "newbi" programming experience or if this is something seasoned coders also fight with. Thank you. Edit In response to Tyanna's reply. I modified the code and it still doesn't work. I posted it below. I made sure that I checked the Google Console to insure the basics were taken care of, such as not getting a read-error on the library. <!DOCTYPE html> <meta charset="UTF-8"> <title>knob</title> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/hot-sneaks/jquery-ui.css" type="text/css" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js" charset="utf-8"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js"></script> <script src="js/jquery.knob.js"></script> <div id="button1">test </div> <script> $(function() { $("#button1").click(function () { $('.dial').trigger( 'configure', { "min":10, "max":40, "fgColor":"#FF0000", "skin":"tron", "cursor":true } ); }); }); </script>

    Read the article

  • <optgroup> Not working in jQuery Dropdown

    - by Santhosh Kumar
    I have a asp:dropdownlist which i have changed to jQuery multiselect. I have to group the data inside the dropdown. I am grouping this in runtime.If it is a normal asp dropdown its working. When applying jquery Multiselect its dosen't. Source: <link rel="stylesheet" type="text/css" href="Styles/jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="Styles/jquery.multiselect.filter.css" /> <link rel="stylesheet" type="text/css" href="Styles/style.css" /> <link rel="stylesheet" type="text/css" href="Styles/prettify.css" /> <%--<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>--%> <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="Scripts/jquery.multiselect.js"></script> <script type="text/javascript" src="Scripts/jquery.multiselect.filter.js"></script> <script type="text/javascript" src="Scripts/prettify.js"></script> <script type="text/javascript"> $(document).ready(function () { //Create groups for dropdown list $("option[classification='LessThanFive']").wrapAll("<optgroup label='Less Than Five' />"); $("option[classification='GreaterThanFive']").wrapAll("<optgroup label='Greater Than five' />"); }); </script> <asp:DropDownList ID="MobileData" runat="server" OnDataBound="ddl_DataBound"> </asp:DropDownList> //Code Behind: protected void ddl_DataBound(object sender, EventArgs e) { foreach (ListItem item in ((DropDownList)sender).Items) { if (System.Int32.Parse(item.Value) < 2) item.Attributes.Add("classification", "LessThanFive"); else item.Attributes.Add("classification", "GreaterThanFive"); } } protected void Page_Load(object sender, EventArgs e) { ListItemCollection list = new ListItemCollection(); list.Add(new ListItem("1", "1")); list.Add(new ListItem("2", "2")); list.Add(new ListItem("3", "3")); list.Add(new ListItem("4", "4")); list.Add(new ListItem("5", "5")); list.Add(new ListItem("6", "6")); list.Add(new ListItem("7", "7")); list.Add(new ListItem("8", "8")); list.Add(new ListItem("9", "9")); list.Add(new ListItem("10", "10")); MobileData.DataSource = list; MobileData.DataBind(); } Where i'm wrong?

    Read the article

  • Syntax Highlight and Autocomplete in Geany for GTK+ (C)

    - by Prasanna Choudhari
    I have just started GTK+ coding in C. I was curious whether i can get syntax highlight and auto-completion working for my GTK code... because as a beginner it would be helpful. I was completely convinced that it was not possible until i came across this video on youtube: https://www.youtube.com/watch?v=AyeQrO1VDFM&feature=plcp I asked the uploader for help, but turns out his last activity on youtube was in Septembeer :( I also tried opening the gtk.h file with geany as i had read somewhere that it worked, but unfortunately it didn't work too. Any help? :'(

    Read the article

  • Elevate the weight of browsing history in Google Chrome's autocomplete

    - by maayank
    Google Chrome has the feature of auto-completing web addresses while you type them in the address bar. Alas, it gives absurdly more weight to Google's own auto-suggest v.s. my own browsing history, which seems a bit foolish - if I regularly (i.e. twice a week) check a certain website with the keywords "foo bar ponies" in its url, it is reasonable to expect that I will want to visit that site again and not other sites. While a bit subjective, to the very least I would expect such URLs to be in the list Chrome suggests, even if not at the top. Is there some plugin/secret option that alters the default behavior?

    Read the article

  • Strange zsh autocomplete behaviour.

    - by Leda
    Every time I use tab autocompletion with zsh instead of completing the current string, it gives me a new string + options to complete. It's hard to explane, so here is an example. This is what would happen if I type 'ls Nue' and hit tab. [me@mbp:/Volumes/hdd/music]: ls Neu ls Neu Neuraxis/ Neurosis/ Neutral\ Milk\ Hotel/ If I delete the second `ls Nue', I am unable to delete the white space and the first. If I hit return, it is as if I have just entered a blank line. Does anyone know what is going on.

    Read the article

  • JQUery autocompleter not working properly in IE8

    - by Pete Herbert Penito
    Hi everyone! I have some script which is working in firefox and chrome but in IE 8 I get this error: $.Autocompleter.defaults = { inputClass: "ac_input", resultsClass: "ac_results", loadingClass: "ac_loading", minChars: 1, delay: 400, matchCase: false, matchSubset: true, matchContains: false, cacheLength: 10, max: 100, mustMatch: false, extraParams: {}, selectFirst: true, //the following line throws the error, read down for error message formatItem: function(row) { return row[0]; }, formatMatch: null, autoFill: false, width: 0, multiple: false, multipleSeparator: ", ", highlight: function(value, term) { return value.replace(new RegExp("(?![^&;]+;)(?!<[^<])(" + term.replace(/([\^\$()[]{}*.+\?\|\])/gi, "\$1") + ")(?![^<])(?![^&;]+;)", "gi"), "$1"); }, scroll: true, scrollHeight: 180 }; ` the specific error reads: '0' is null or not an object can I perhaps change the the row[0] to something? This is found in jquery.autocomplete.js and it reads the same in firefox and doesn't cause the error, so i don't really want to change this if at all possible. any advice would help thanks!

    Read the article

  • Why build Javascript functions as JQuery plugins?

    - by Mohammad
    I've seen alot of JQuery implementations of existent JavaScript functions that merely wrap the JavaScript code in a JQuery wrapper and don't actually rely on any of JQuery's base for their operation. What are the benefits of using Javascript as a JQuery plugin? If there are none is there a speed loss to use a JQuery plugin that could have easily been implemented outside the wrapper just as well? Many thanks in advance (just trying to learn something here).

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >