Search Results

Search found 18009 results on 721 pages for 'jquery hover'.

Page 89/721 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • jQuery: What does (function($) {})(jQuery); mean?

    - by Legend
    I am just starting out with writing jQuery plugins. I wrote three small plugins but I have been simply copying the line into all my plugins without actually knowing what it means. Can someone tell me a little more about these? What does this do? (I know it extends jQuery somehow but is there anything else interesting to know about this) (function($) { })(jQuery); What is the difference between the following two ways of writing a plugin: Type 1: (function($) { $.fn.jPluginName = { }, $.fn.jPluginName.defaults = { } })(jQuery); Type 2: (function($) { $.jPluginName = { } })(jQuery); I could be way off here and maybe both mean the same thing. In some cases, this doesn't seem to be working in a plugin that I was writing using Type 1. Any idea why? But in either case, I would appreciate any explanation.

    Read the article

  • Jquery slider with gradscales

    - by Karthik
    hi folks I am using this jquery ui for the slider.here i want the gradscale like poor----excellecnt-------average------good how do this in this script? <script src="../../Scripts/jquery.ui.core.js" type="text/javascript"></script> <script src="../../Scripts/jquery.ui.widget.js" type="text/javascript"></script> <script src="../../Scripts/jquery.ui.mouse.js" type="text/javascript"></script> <script src="../../Scripts/jquery.ui.slider.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $("#slider").slider(); }); </script>

    Read the article

  • Jquery Resizable Image size issue

    - by alex
    Image size is not automatically detected when using jquery resizable. Both Firefox and IE displays the image much smaller, and chrome show nothing at all. I can't seem to find a direct answer to this issue. How can this be fixed. <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/base/jquery-ui.css" type="text/css" media="all"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"> </script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js" type="text/javascript"> </script> <img src="http://www.carsyouwilldrive.com/wp-content/uploads/2009/06/futurecar1.jpg"> <script type="text/javascript"> $("img").resizable(); </script>

    Read the article

  • jQuery: how to find first visible input/select/textarea excluding buttons?

    - by Artem
    I tried $(":input:not(input[type=button],input[type=submit],button):visible:first") but it doesn't find anything. What is my mistake? UPD: I execute this on $(document).load() <script type="text/javascript"> $(window).load(function () { var aspForm = $("form#aspnetForm"); var firstInput = $(":input:not(input[type=button],input[type=submit],button):visible:first", aspForm); firstInput.focus(); }); </script> and in the debug I can see that firstInput is empty. UPD2: I'm in ASP.NET page running under Sharepoint. I've found so far that for some elements it does find them (for fixed ones) and for some don't. :(

    Read the article

  • How to get text value in a div vs. an alert modal - jquery

    - by smudge
    Does anyone have an easy way to have text in a div show what's changed in the following statement vs. an alert modal? I can't seem to get my head around it. Thanks... $(function(){ var abc = $('select#percent').selectToUISlider(); labels: 0 $('select#valueA, select#valueB').selectToUISlider({ labels: 0, sliderOptions: { change:function(e, ui) { alert('changed'+$('select#valueA option').eq(ui.values[0]).text()); alert('changed'+$('select#valueB option').eq(ui.values[1]).text()); } } });

    Read the article

  • JQuery: How to apply css to a .wrap element?

    - by Eamonn
    My code thus far: $(".lorem img:not(.full-img)").each(function() { $(this).addClass("inline-img"); var imgWidth = $(this).prop('width'); var imgHeight = $(this).prop('height'); var imgFloat = $(this).prop('float'); $(this).wrap('<div class="inline-img-wrap" />'); if ($(this).prop("title")!='') { $('<p class="inline-img-caption">').text($(this).prop('title')).insertAfter($(this)); } }); I am searching for images within a body of text, appending their title values as captions underneath, and wrapping both img and p in a div.inline-img-wrap. That works fine. What I need help with is applying the styling of the img to the new wrapping div instead. You can see I have created vars for just this, but cannot get applying them to work. $this will always apply to the image, and <div class="inline-img-wrap" style="width:'+imgWidth+'"> doesn't work. All advice appreciated!

    Read the article

  • problem with the drop down menu with jquery

    - by amir
    Hi Basically I have some links which include some other links, I'm trying to show the parent links only and when one clicks on the parent link the child links should appear and when one clicks on the parent link again the child link should disappear, the code works for the first click and it opens the relevant child links but how do I make them disappear when I click on the parent link again, thanks for the help. jQuery.noConflict(); jQuery(document).ready(function(e) { jQuery('.nav-container ul.level0 li.level1 a').click(function(e) { e.preventDefault(); jQuery(this).css({'background':'#000000','color':'#ffffff'}); jQuery('.nav-container ul.level0 li.level2 a').css('display','block'); }); });

    Read the article

  • How do I ensure jQuery ajax call does not send a local copy of file?

    - by Tommy
    $.ajax({ type: 'GET', url: "string.txt", cache: false, success: function(str){ alert("Data is: "+ str); } }); In this example, string.txt is still sent to the cache (\Temporary Internet Files) How do I ensure that the file is not sent - read from the server only? Am I missing an option? I set cache to false but that does not block it from being sent to client. For example, ajax POST does not send a local copy..... Thanks

    Read the article

  • Is it possible to supply the jQuery Validation plugin with a rules object?

    - by ethagnawl
    I took the rules that I'd been using to validate my form and broke them out into a JSON object, hoping to use the same set of rules for client/server validation. So, where I had: $(document.getElementById('new_listing_form')).validate({ rules: { apt: { required: true } } }); I'm attempting to use: var rules_obj = { apt: { required: true } }; $(document.getElementById('new_listing_form')).validate({ rules: rules_obj }); ... and the form is not being validated. Does anyone know if this is possible?

    Read the article

  • JQuery UI: is it possible to know where an object has been dropped?

    - by Jack Duluoz
    Hi, what I want to do is to know where (not in terms of position (x, y), but a reference to the DOM element) an object was dropped. I have a grid made up with divs where you can drop various items and I need to know which div on the grid was the item dropped on (getting its id would be fine). The callback function function(event, ui) { //code here } has just that ui object who doesn't apparently contain any information about this, but only about the draggable item or its helper.

    Read the article

  • Is it good to use JQuery's validation plugin?

    - by kwokwai
    Hi all, I am learning JQuery, and I have checked out that JQUery has got a validation plugin. http://docs.jquery.com/Plugins/Validation#Validate_forms_like_you.27ve_never_been_validating_before.21 To use it, users have to include another script file in the Head tag in HTML. I am thinking if this will cause any code collisions to the codes in the validation plugin when more and more javascript files are included. Should I use JQuery to write myself new customed functions for checking data input from users or use the JQuery data validation plugin? Please advise.

    Read the article

  • Is there a way to access a php class method using javascript through jquery?

    - by Starx
    I have a js script, which is $("#feedbacksubmit").click(function() { if($("#frmfeedback").valid()) { var tname = $("#name").val(); var temail = $("#email").val(); var tphone = $("#phone").val(); var tcontent = $("#content").val(); var tsend = $(this).attr('ts'); $.post ( "bll/index.php", { action: 'mailfeedback', name: tname, email: temail, phone: tphone, content: tcontent, send: tsend }, function(data) { $('.msgbox').html(data); $("#frmfeedback")[0].reset(); }); return false; } }); however, I am trying to see if there is a way to access the class method of bll/index.php directly from the script, instead of posting parameters, to access it

    Read the article

  • This should be real easy. How to find a button through its Value (Jquery Selector)

    - by Raja
    I have this HTML: <div id='grid'> <input type="button" value="edit"/> <input type='button' value='update'/> </div> How to I attach a click event only to Update button. I know I could add a class to it or specity an id but both are not possible since it is in gridview. I tried this: $("input:button[@value='update']").click(function(){alert('test');}); but it displays an alert for both buttons. I know I must be doing something silly. Any help is much appreciated. Thanks Kobi for helping me out. Given below is the right answer. $("input[value='update']").click(function(){alert('test');});

    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

  • jQuery slideDown() not animating (jquery-rails 3.0.4; jquery-ui-rails (4.0.5)

    - by Michael Guren
    I am following along in the latest Agile Web Development with Rails 4 book. In Chapter 11 (AJAX), the book instructs us to use the following code in the "create.js.erb" file: if ($('#cart tr').length == 1) { $('#cart').show('blind', 1000); } This code causes the #cart div to jump down without any content. After 1 second it appears. There is no sliding effect. I tried using slideDown(); as well, but the div just appears immediately. Out of curiosity, I tried slideUp(); when the div was visible. Voila. The div slid up. This appears to be a jQuery bug and wondered if anyone else has experienced this, or has any suggestions for me. Thanks.

    Read the article

  • jQuery selector to target any CSS name (of multiple present) starting with a prefix?

    - by John K
    I'm considering one selection statement that would target one of many css class names in a single class attribute value based on a string prefix. For example, I want any detail- prefixed class names to get targeted from the following sample links. <a href="eg.html" class="detail-1 pinkify another"> <a href="eg.html" class="something detail-55 minded"> <a href="eg.html" class="swing narrow detail-Z"> <a href="eg.html" class="swing narrow detail-Z detail-88 detail-A"> It's reminiscent of how [class|="detail"] prefix selector works on a scalar attribute value, and also of .hasClass(className), but my question needs both concepts applied simultaneously. Note: The detail- prefix won't necessarily be the first class name of the bunch.

    Read the article

  • Does jQuery.on() work for elements that are added after the event handler is created?

    - by orokusaki
    I was under the impression all this time that .on() worked like .live() with regards to dynamically created elements (e.g. I use $('.foo').on('click', function(){alert('click')}); and then an element with the class foo is created due to some AJAX, now I'm expecting a click on that element to cause an alert). In practice, these weren't the results I got. I could be making a mistake, but could somebody help me understand the new way to achieve these results, in the wake of .on()? Thanks in advance.

    Read the article

  • Getting imagename and make link from <img> with jQuery

    - by Bulan
    With jQuery, I want to make all images under a specific path on a site clickable and showing a big image using Fancybox, which is a lighbox variant plugin for jQuery. My small images are located under "images/products/small", the big ones under "images/products/big" and the imagename is always the same The page is showing the image with the following code: <img src="images/products/small/hat.jpg" alt="Nice hat"> What i want is some jQuery script that makes this into: <a href="images/products/big/hat.jpg" class="fancybox"><img src="images/products/small/hat.jpg" alt="Nice hat"></a> Maybe the part with setting class on the link tag can be skipped and just activate fancybox on the element directly with $(elm).fancybox(); I was looking around a bit and it looks like the jQuery functions "attr" and "wrap" might be useful, but with my currently limited jQuery skills I can't really connect the dots.

    Read the article

  • initialize jquery slider with hidden input value from database.

    - by ludwigs3rd
    I'm using a slider as user input for a screen. Basically it's a bulk update screen where there is a table with multiple rows, thus multiple sliders. I created it so that the hidden value is what gets posted in the form. <td> <input class="percentageProvidedHidden" type="hidden" name='<%= "Values[" + i + "].Percentage" %>' value='<%=item.Percentage %>' /> <div class="percentageProvidedSlider"></div> </td> I have the update working just fine (move slider changes hidden input value, submit, values are updated in db), however, I can't get the damn thing to initialize with the value of the hidden input (note the "value: " parameter below). In this case I think $(this) isn't actually $('percentageProvidedSlider') but the page itself. Can someone help me get the slider value to initialize with the hidden input field? I'm using ASP .Net MVC 2 so if there are any methods I should try with that I welcome them as well. $('.percentageProvidedSlider').slider( { min: 0, max: 100, step: 25, value: $(this).parents('tr').find('input.percentageProvidedHidden').val(), slide: function(e, ui) { var mypos = ui.value; $(this).find('.ui-slider-handle').text(ui.value); }, change: function(event, ui) { var myVal = $(this).slider("option", "value"); $(this).parents('tr').find('input.percentageProvidedHidden').val(myVal); var myDropDown = $(this).parents('tr').find('select.verified'); } });

    Read the article

  • Can't type anything in inputs or textareas

    - by dev reactive.by
    Hello, I have a problem: I've add a Jquery UI drag-n-drop widget to my page, but after that I can't type anything into inputs or textareas. I use jQuery 1.4.2 and jQuery UI 1.8rc3, and tiny_mce for convert textareas into WYSIWUG editor (I've tried to disable tiny_mce). When I put $("input").click( function(){ alert('clicked!'); }); - it's working(I have an alert). When I get focused to any input I even can't refresh page by F5 and go to the next element by Tab key. There's a page: http://cms.reactive.by/test.htm (click to clip2net.com/clip/m7787/1269022358-clip-3kb.png to see that jQuery UI is workong) And yes.. there's no errors in FireBug. I hope You can help me to understand what's wrong with this code.

    Read the article

  • Is there a way to delete a form element without using jQuery .remove()?

    - by Tommy
    Using .remove() so that the select all check box is not submitted to the server. However, it is visible to the user as the select all checkbox is "physically" removed from the web page, upon submit. Instead, I would like removing the select all check box to appear seamless but NOT on the server side. i.e. - I would like to keep the input on the page but remove the element in the form array before it is sent. Can I manipulate the element[] array of the form before it is sent to the server and delete it there? Thank you.

    Read the article

  • How do I return a subset in jQuery plugin?

    - by wamp
    By default it's like this: $.fn.ellipsis = function() { ... return this.each(function(){ //do some operation on each element here to see if it qualifies } } But now I want to return a subset of all, only those qualify in this.each(function() {}), how to modify the code so that it finally returns only those that qualify?

    Read the article

  • passing array fields to jquery ajax

    - by Rob Brandt
    I have a form I am submitting via jquery ajax. Early in the form, I have this field: <select name="inquirymodule[]" id="inquirymodule"> The user can add as many as they like, and all the selects go into the inquirymodule[] array. The jQuery looks like this: jQuery.ajax({ type: 'POST', url: 'ajax.php', dataType: 'json', data: { inquirymodule: jQuery("select[name='inquirymodule[]']").serialize(), }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert('error'); } }); That works fine. Trying to do the same thing with a date, like this: <input class="formInput" type="text" id="startBreak0" name='startbreak[]' /> adding startbreak: jQuery("select[name='startbreak[]']").serialize() to the ajax call. It doesn't work, I cannot see why. Suggestions?

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >