Search Results

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

Page 14/706 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Firefox: how to autocomplete password but not username

    - by Tristan
    I'm a part of a team testing a web application that needs to log into hundreds of test accounts every day. The password is always the same, but the usernames constantly change. I can save the password without an accompanying username, but then it won't autocomplete when I next visit the site. I am hoping to get Firefox to autocomplete the password field but not the username field. To make things more difficult, we're unable to use any third party addons or software thanks to beuraucratic restrictions. We're also unable to modify the login page on the server's side. Does anyone have any ideas?

    Read the article

  • Ajax call in a jQuery plugin not working properly

    - by Saneef
    I'm trying to create a jQuery plugin, inside I need to do an AJAX call to load an xml. jQuery.fn.imagetags = function(options) { s = jQuery.extend({ height:null, width:null, url:false, callback:null, title:null, }, options); return this.each(function(){ obj = $(this); //Initialising the placeholder $holder = $('<div />') .width(s.width).height(s.height) .addClass('jimageholder') .css({ position: 'relative', }); obj.wrap($holder); $.ajax({ type: "GET", url: s.url, dataType: "xml", success:function(data){ initGrids(obj,data,s.callback,s.title); } , error: function(data) { alert("Error loading Grid data."); }, }); function initGrids(obj, data,callback,gridtitle){ if (!data) { alert("Error loading Grid data"); } $("gridlist gridset",data).each(function(){ var gridsetname = $(this).children("setname").text(); var gridsetcolor = ""; if ($(this).children("color").text() != "") { gridsetcolor = $(this).children("color").text(); } $(this).children("grid").each(function(){ var gridcolor = gridsetcolor; //This colour will override colour set for the grid set if ($(this).children("color").text() != "") { gridcolor = $(this).children("color").text(); } //addGrid(gridsetname,id,x,y,height,width) addGrid( obj, gridsetname, $(this).children("id").text(), $(this).children("x").text(), $(this).children("y").text(), $(this).children("height").text(), $(this).children("width").text(), gridcolor, gridtitle ); }); }); } function addGrid(obj,gridsetname,id,x,y,height,width,color,gridtitle){ //To compensate for the 2px border height-=4; width-=4; $grid = $('<div />') .addClass(gridsetname) .attr("id",id) .addClass('gridtag') .imagetagsResetHighlight() .css({ "bottom":y+"px", "left":x+"px", "height":height+"px", "width":width+"px", }); if(gridtitle != null){ $grid.attr("title",gridtitle); } if(color != ""){ $grid.css({ "border-color":color, }); } obj.after($grid); } }); } The above plugin I bind with 2 DOM objects and loads two seperate XML files but the callback function is run only on the last DOM object using both loaded XML files. How can I fix this, so that the callback is applied on the corresponding DOMs. Is the above ajax call is correct? Sample usage: <script type="text/javascript"> $(function(){ $(".romeo img").imagetags({ height:500, width:497, url: "sample-data.xml", title: "Testing...", callback:function(id){ console.log(id); }, }); }); </script> <div class="padding-10 min-item background-color-black"> <div class="romeo"><img src="images/samplecontent/test_500x497.gif" alt="Image"> </div> </div> <script type="text/javascript"> $(function(){ $(".romeo2 img").imagetags({ height:500, width:497, url: "sample-data2.xml", title: "Testing...", callback:function(id){ console.log(id); }, }); }); </script> <div class="padding-10 min-item background-color-black"> <div class="romeo2"><img src="images/samplecontent/test2_500x497.gif" alt="Image"> </div> </div> Here is the sample XML data: <?xml version="1.0" encoding="utf-8"?> <gridlist> <gridset> <setname>gridset4</setname> <color>#00FF00</color> <grid> <color>#FF77FF</color> <id>grid2-324</id> <x>300</x> <y>300</y> <height>60</height> <width>60</width> </grid> </gridset> <gridset> <setname>gridset3</setname> <color>#00FF00</color> <grid> <color>#FF77FF</color> <id>grid2-212</id> <x>300</x> <y>300</y> <height>100</height> <width>100</width> </grid> <grid> <color>#FF77FF</color> <id>grid2-1212</id> <x>200</x> <y>10</y> <height>200</height> <width>10</width> </grid> </gridset> </gridlist>

    Read the article

  • jQuery 1.4 Opacity and IE Filters

    - by Rick Strahl
    Ran into a small problem today with my client side jQuery library after switching to jQuery 1.4. I ran into a problem with a shadow plugin that I use to provide drop shadows for absolute elements – for Mozilla WebKit browsers the –moz-box-shadow and –webkit-box-shadow CSS attributes are used but for IE a manual element is created to provide the shadow that underlays the original element along with a blur filter to provide the fuzziness in the shadow. Some of the key pieces are: var vis = el.is(":visible"); if (!vis) el.show(); // must be visible to get .position var pos = el.position(); if (typeof shEl.style.filter == "string") sh.css("filter", 'progid:DXImageTransform.Microsoft.Blur(makeShadow=true, pixelradius=3, shadowOpacity=' + opt.opacity.toString() + ')'); sh.show() .css({ position: "absolute", width: el.outerWidth(), height: el.outerHeight(), opacity: opt.opacity, background: opt.color, left: pos.left + opt.offset, top: pos.top + opt.offset }); This has always worked in previous versions of jQuery, but with 1.4 the original filter no longer works. It appears that applying the opacity after the original filter wipes out the original filter. IOW, the opacity filter is not applied incrementally, but absolutely which is a real bummer. Luckily the workaround is relatively easy by just switching the order in which the opacity and filter are applied. If I apply the blur after the opacity I get my correct behavior back with both opacity: sh.show() .css({ position: "absolute", width: el.outerWidth(), height: el.outerHeight(), opacity: opt.opacity, background: opt.color, left: pos.left + opt.offset, top: pos.top + opt.offset }); if (typeof shEl.style.filter == "string") sh.css("filter", 'progid:DXImageTransform.Microsoft.Blur(makeShadow=true, pixelradius=3, shadowOpacity=' + opt.opacity.toString() + ')'); While this works this still causes problems in other areas where opacity is implicitly set in code such as for fade operations or in the case of my shadow component the style/property watcher that keeps the shadow and main object linked. Both of these may set the opacity explicitly and that is still broken as it will effectively kill the blur filter. This seems like a really strange design decision by the jQuery team, since clearly the jquery css function does the right thing for setting filters. Internally however, the opacity setting doesn’t use .css instead hardcoding the filter which given jQuery’s usual flexibility and smart code seems really inappropriate. The following is from jQuery.js 1.4: var style = elem.style || elem, set = value !== undefined; // IE uses filters for opacity if ( !jQuery.support.opacity && name === "opacity" ) { if ( set ) { // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level style.zoom = 1; // Set the alpha filter to set the opacity var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"; var filter = style.filter || jQuery.curCSS( elem, "filter" ) || ""; style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity; } return style.filter && style.filter.indexOf("opacity=") >= 0 ? (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "": ""; } You can see here that the style is explicitly set in code rather than relying on $.css() to assign the value resulting in the old filter getting wiped out. jQuery 1.32 looks a little different: // IE uses filters for opacity if ( !jQuery.support.opacity && name == "opacity" ) { if ( set ) { // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level elem.zoom = 1; // Set the alpha filter to set the opacity elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) + (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); } return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '': ""; } Offhand I’m not sure why the latter works better since it too is assigning the filter. However, when checking with the IE script debugger I can see that there are actually a couple of filter tags assigned when using jQuery 1.32 but only one when I use jQuery 1.4. Note also that the jQuery 1.3 compatibility plugin for jQUery 1.4 doesn’t address this issue either. Resources ww.jquery.js (shadow plug-in $.fn.shadow) © Rick Strahl, West Wind Technologies, 2005-2010Posted in jQuery  

    Read the article

  • jQuery UI Tabs animation

    - by Ayrton
    Hi I haven't been able to find a lot of documentation on animating the jQuery UI Tabs, so I'm wondering if anyone knows how to simulate a grow/shrink effect relatively to the current tab I don't really like the height: 'toggle' animation where the tab goes to height 0px first and then the height of the new tab. when tab 1 has a height of 100px and the second a height of 120px I would like the tab to grow 20px

    Read the article

  • Firefox crashes with mulitple Uploadify JQuery browse buttons and ajax

    - by droidy
    Hi, I'm using four JQuery Uploadify browse buttons on a page that's calling the Uploadify code/buttons through Ajax. We have a javascript function called from onComplete which refreshes the Ajax page. The problem we're encountering is that when you start uploading one file, if you click browse to upload another file, Firefox will crash when selecting the second file. Any help is appreciated. Thanks!

    Read the article

  • Display issue with jQuery dialog: form shows as separate window

    - by RememberME
    On my button click, the jQuery dialog appears with just the title and buttons. When you mouseover, then you see the form inputs in front of the dialog covering the buttons. When you scroll down, the form inputs do not move, so you can never see the last few textboxes. <div id="popupCreateCompany" title="Create a new company"> <form> <fieldset> <p> <label for="company_name">Company Name:</label> <%= Html.TextBox("company_name") %> </p> <p> <label for="company_desc">Company Description:</label> <%= Html.TextBox("company_desc") %> </p> <p> <label for="address">Address:</label> <%= Html.TextBox("address") %> </p> <p> <label for="city">City:</label> <%= Html.TextBox("city") %> </p> <p> <label for="state">State:</label> <%= Html.TextBox("state") %> </p> <p> <label for="zip">Zip:</label> <%= Html.TextBox("zip") %> </p> <p> <label for="website">Website:</label> <%= Html.TextBox("website") %> </p> </fieldset> </form> </div> jQuery: <script type="text/javascript"> $(document).ready(function() { $('input').filter('.datepick').datepicker(); $('#popupCreateCompany').dialog( { autoOpen: false, modal: true, buttons: { 'Add': function() { var dialog = $(this); var form = dialog.find('input:text'); $.post('/company/create', $(form).serialize(), function() { dialog.dialog('close'); }) }, 'Cancel': function() { $(this).dialog('close'); } } }); $("#create-company").click(function() { $('#popupCreateCompany').dialog('open'); }); On mouseover: After scroll down:

    Read the article

  • Accessible semantic jQuery tabs plugin

    - by user249950
    Hello, Just a quick question to see if anyone knows of any jquery tabs plugins that run based on a similar structure to: <div class="tabs"> <div> <h4>Tab one</h4> <p>Lorem Ipsum</p> </div> <div> <h4>Tab two</h4> <p>Lorem Ipsum</p> </div> </div> Where the plugin grabs the title of the tabs from the h4s? I can only seem to find plugins that use the structure: <div id="tabs"> <ul> <li><a href="#tabs-1">Nunc tincidunt</a></li> <li><a href="#tabs-2">Proin dolor</a></li> <li><a href="#tabs-3">Aenean lacinia</a></li> </ul> <div id="tabs-1"> <p>Tab 1 content</p> </div> <div id="tabs-2"> <p>Tab 2 content</p> </div> <div id="tabs-3"> <p>Tab 3 content</p> </div> </div> I assume the only other way to use these plugins would be to grab the titles, remove them, add them into a list at the top of the html and then run the plugin based on that? I just ask as I am quite new to jQuery so I'm not sure how I would go about it and just wondered if there was a plugin already in existence that anyone knew of. If not, not to worry, I'll have to get busy with the docs and give it a go! Cheers

    Read the article

  • load google annotated chart within jquery ui tab content via ajax method

    - by twmulloy
    Hi, I am encountering an issue with trying to load a google annotated chart (http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html) within a jquery ui tab using content via ajax method (http://jqueryui.com/demos/tabs/#ajax). If instead I use the default tabs functionality, writing out the code things work fine: <div id="tabs"> <ul> <li><a href="#tabs-1">Chart</a></li> </ul> <div id="tabs-1"> <script type="text/javascript"> google.load('visualization', '1', {'packages':['annotatedtimeline']}); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('date', 'Date'); data.addColumn('number', 'cloudofinc.com'); data.addColumn('string', 'header'); data.addColumn('string', 'text') data.addColumn('number', 'All Clients'); data.addRows([ [new Date('May 12, 2010'), 2, '2 New Users', '', 3], [new Date('May 13, 2010'), 0, undefined, undefined, 0], [new Date('May 14, 2010'), 0, undefined, undefined, 0], ]); var chart = new google.visualization.AnnotatedTimeLine(document.getElementById('chart_users')); chart.draw(data, { displayAnnotations: false, fill: 10, thickness: 1 }); } </script> <div id='chart_users' style='width: 100%; height: 400px;'></div> </div> </div> But if I use the ajax method for jquery ui tab and point to the partial for the tab, it doesn't work completely. The page renders and once the chart loads, the browser window goes white. However, you can see the tab partial flash just before the chart appears to finish rendering (the chart never actually displays). I have verified that the partial is indeed loading properly without the chart. <div id="tabs"> <ul> <li><a href="ajax/tabs-1">Chart</a></li> </ul> </div>

    Read the article

  • Cannot populate form with ajax and populate jquery plugin

    - by Azriel_
    I'm trying to populate a form with jquery's populate plugin, but using $.ajax The idea is to retrieve data from my database according to the id in the links (ex of link: get_result_edit.php?id=34), reformulate it to json, return it to my page and fill up the form up with the populate plugin. But somehow i cannot get it to work. Any ideas: here's the code: $('a').click(function(){ $('#updatediv').hide('slow'); $.ajax({ type: "GET", url: "get_result_edit.php", success: function(data) { var $response=$(data); $('#form1').populate($response); } }); $('#updatediv').fadeIn('slow'); return false; whilst the php file states as follow: <?php $conn = new mysqli('localhost', 'XXXX', 'XXXXX', 'XXXXX'); @$query = 'Select * FROM news WHERE id ="'.$_GET['id'].'"'; $stmt = $conn->query($query) or die ($mysql->error()); if ($stmt) { $results = $stmt->fetch_object(); // get database data $json = json_encode($results); // convert to JSON format echo $json; } ?> Now first thing is that the mysql returns a null in this way: is there something wrong with he declaration of the sql statement in the $_GET part? Second is that even if i put a specific record to bring up, populate doesn't populate. Update: I changed the populate library with the one called "PHP jQuery helper functions" and the difference is that finally it says something. finally i get an error saying NO SUCH ELEMENT AS i wen into the library to have a look and up comes the following function function populateFormElement(form, name, value) { // check that the named element exists in the form var name = name; // handle non-php naming var element = form[name]; if(element == undefined) { debug('No such element as ' + name); return false; } // debug options if(options.debug) { _populate.elements.push(element); } } Now looking at it one can see that it should print out also the name, but its not printing it out. so i'm guessing that retrieving the name form the json is not working correctly. Link is at http://www.ocdmonline.org/michael/edit%5Fnews.php with username: Testing and pass:test123 Any ideas?

    Read the article

  • Retrieve jquery-ui dialog's div

    - by Hikari
    When we apply $().dialog() in an object, jquery-ui puts it inside a <div class="ui-dialog ui-widget">, with a <div class="ui-dialog-titlebar ui-widget-header"> before it. After the creation of this dialog around the main object, how can we get that ui-dialog object so that we can execute other JavaScript commands in it? The best I could do was use .parent(".ui-dialog") in the main object, is there a better way to do it?

    Read the article

  • how to find selected elements with Jquery UI selectable

    - by kevzettler
    Hi All, I am looking for info on the event and ui objects the jquery selectable events: "selecting", and "start" take as parameters. I cannot find this in the documentation and looping through the properties is no help. $('#content_td_account').selectable({ filter: 'li:not(".non_draggable")', selecting: function(event, ui) { } }); Specifically I want to find what elements are being selected and check them to see if their parent elements are the same or not. I assumed this would be in the ui object some where.

    Read the article

  • jquery textarea validation

    - by Hulk
    How to check for null,white spaces and new lines while validating for a textarea using jquery. If the textarea is empty and has only new lines or spaces should raise an alert

    Read the article

  • JQuery UI Tabs - "Loading..." message

    - by Balu
    All, I am using Jquery UI nested tabs. I was just wondering if there is any way to display an AJAX Spinner image next to the tab text, while the tab is loading. I do not want to change the tab text to "Loading..". Consider that when multiple tabs are loading at the same time or one after the other, the spinner image should be displayed next to each loading tab.. Any Suggestions? Thanks

    Read the article

  • jquery ajax post callback - manipulation stops after the "third" call

    - by shanyu
    EDIT: The problem is not related to Boxy, I've run into the same issue when I've used JQuery 's load method. EDIT 2: When I take out link.remove() from inside the ajax callback and place it before ajax load, the problem is no more. Are there restrictions for manipulating elements inside an ajax callback function. I am using JQuery with Boxy plugin. When the 'Flag' link on the page is clicked, a Boxy modal pops-up and loads a form via ajax. When the user submits the form, the link (<a> tag) is removed and a new one is created from the ajax response. This mechanism works for, well, 3 times! After the 3rd, the callback function just does not remove/replace/append (tested several variations of manipulation) the element. The only hint I have is that after the 3rd call, the parent of the link becomes non-selectable. However I can't make anything of this. Sorry if this is a very trivial issue, I have no experience in client-side programming. The relevant html is below: <div class="flag-link"> <img class="flag-img" style="width: 16px; visibility: hidden;" src="/static/images/flag.png" alt=""/> <a class="unflagged" href="/i/flag/showform/9/1/?next=/users/1/ozgurisil">Flag</a> </div> Here is the relevant js code: $(document).ready(function() { $('div.flag-link a.unflagged').live('click', function(e){ doFlag(e); return false; }); ... }); function doFlag(e) { var link = $(e.target); var url = link.attr('href'); Boxy.load(url, {title:'Inappropriate Content', unloadOnHide:true, cache:false, behaviours: function(r) { $("#flag-form").live("submit", function(){ var post_url = $("#flag-form").attr('action'); boxy = Boxy.get(this); boxy.hideAndUnload(); $.post(post_url, $("#flag-form").serialize(), function(data){ par = link.parent(); par.append(data); alert (par.attr('class')); //BECOMES UNDEFINED AT THE 3RD CALL!! par.children('img.flag-img').css('visibility', 'visible'); link.remove(); }); return false; }); }}); }

    Read the article

  • Setting Tab Order on UI Elements in jQuery Dialog

    - by McNamron
    Is there a way to specify the tab order of the elements within a jQuery Dialog which itself contains an Accordion? The dialog also specifies one button in the buttons options. For accessibility, we need to be able to tab through the accordion panes, the form elements in each accordion, the button in the buttons options, and the close icon of the dialog itself, but tabbing seems to be skipping over the button in the buttons options, and I can't find any resource that has a resolution for this sort of problem.

    Read the article

  • jquery ui dialog button

    - by mike
    Hello, With a jQuery UI dialog, I need to be able to set tooltips on buttons... I have the following code: buttons: { 'My Button' : function(e) { $(e.target).mouseover(function() { alert('test'); }); } This allows me to do something on "mouseover" but only once the button has been clicked. What do I need to do in order to make this function before the button has been clicked? Thanks

    Read the article

  • jquery autosuggest: what is wrong with this code?

    - by Abu Hamzah
    i have been struggling to make it work my autosugest/autocomplete and its acting strange unless i am doing completely silly here. please have a look 1) does not do anything, does not work or nor fire the event. <script src="Scripts/jquery-1.4.2.js" type="text/javascript"></script> <script src="Scripts/jquery.autocomplete.js" type="text/javascript"></script> <form id="form1" runat="server"> <script type="text/javascript"> $(document).ready(function() { $("#<%=txtHost.UniqueID %>").autocomplete("HostService.asmx/GetHosts", { dataType: 'json' , contentType: "application/json; charset=utf-8" , parse: function(data) { var rows = Array(); debugger for (var i = 0; i < data.length; i++) { rows[i] = { data: data[i], value: data[i].LName, result: data[i].LName }; } return rows; } , formatItem: function(row, i, max) { return data.LName + ", " + data.FName; } }); }); </script> 2) this works if i remove the above code and replace with this code: <script type="text/javascript"> $(document).ready(function() { $("#txtHost").autocomplete("lazy blazy crazy daisy maisy ugh".split(" ")); }); </script> any help ?

    Read the article

  • Jquery change function don’t work properly

    - by user1493448
    I have same id, name two html select. If I change first html select then it’s work properly but If I change second html select then it’s not work. Please can someone point out what I may be doing wrong here? Many thanks. Here is my code: <html> <head> <title>the title</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" language="javascript"> $(document).ready(function() { $("#name").change(function(){ $.post( "data.php", $("#testform").serialize(), function(data) { $('#stage1').html(data); } ); var str = $("#testform").serialize(); $("#stage2").text(str); }); }); </script> </head> <body> <div id="stage1" style="background-color:blue; color: white"> STAGE - 1 </div> <form id="testform"> <table> <tr> <td><p>Fruit:</p></td> <td> <select id="name" name="name[]"> <option>Apple</option> <option>Mango</option> <option>Orange</option> <option>Banana</option> </select> </td> </tr> <tr> <td><p>Fruit:</p></td> <td> <select id="name" name="name[]"> <option>Apple</option> <option>Mango</option> <option>Orange</option> <option>Banana</option> </select> </td> </tr> </table> </form> </body> </html> Php code: <?php $fruit=$_REQUEST["name"]; $n = count($fruit); for($i=0;$i<$n; $i++) { echo $fruit[$i]."<br/>"; } ?>

    Read the article

  • Selected value from drop-down list doesn't post from jquery dialog

    - by RememberME
    I have a jQuery dialog. All of the fields are posting correctly except for the drop-downs, the value is getting passed as null rather than the selected value. <div id="popupCreateCompany" title="Create a new company"> <form> <fieldset> <p> <label for="company_name">Company Name:</label> <%= Html.TextBox("company_name") %> </p> <p> <label for="company_desc">Company Description:</label> <%= Html.TextBox("company_desc") %> </p> <p> <label for="address">Address:</label> <%= Html.TextBox("address") %> </p> <p> <label for="city">City:</label> <%= Html.TextBox("city") %> </p> <p> <label for="state">State:</label> <%= Html.TextBox("state") %> </p> <p> <label for="zip">Zip:</label> <%= Html.TextBox("zip") %> </p> <p> <label for="website">Website:</label> <%= Html.TextBox("website", "http:/") %> </p> <p> <label for="sales_contact">Sales Contact:</label> <%= Html.DropDownList("sales_contact", Model.SelectSalesContacts, "** Select Sales Contact **") %> </p> <p> <label for="primary_company">Primary Company:</label> <%= Html.DropDownList("primary_company", Model.SelectPrimaryCompanies, "** Select Primary Company **") %> </p> </fieldset> </form> jQuery: $('#popupCreateCompany').dialog( { autoOpen: false, modal: true, buttons: { 'Add': function() { var dialog = $(this); var form = dialog.find('input:text'); $.post('/company/create', $(form).serialize(), function() { dialog.dialog('close'); }) }, 'Cancel': function() { $(this).dialog('close'); } } }); $("#create-company").click(function() { $('#popupCreateCompany').dialog('open'); }); My SelectList definitions: public class SubcontractFormViewModel { public subcontract Subcontract { get; private set; } public SelectList SelectPrimaryCompanies { get; set; } public MultiSelectList SelectService_Lines { get; private set; } public SelectList SelectSalesContacts { get; private set; } public SubcontractFormViewModel(subcontract subcontract) { SubcontractRepository subcontractRepository = new SubcontractRepository(); Subcontract = subcontract; SelectPrimaryCompanies = new SelectList(subcontractRepository.GetPrimaryCompanies(), "company_id", "company_name"); SelectService_Lines = new MultiSelectList(subcontractRepository.GetService_Lines(), "service_line_id", "service_line_name", subcontractRepository.GetSubcontractService_Lines(Subcontract.subcontract_id)); SelectSalesContacts = new SelectList(subcontractRepository.GetContacts(), "contact_id", "contact_name"); } }

    Read the article

  • Working on a jQuery plugin : viewport simulator

    - by pixelboy
    Hi community, i'm working on a jQuery plugin that's aiming to simulate one axis camera movements. The first step to achieving this is simple : use conventional, clean markup, and get the prototype to work. Heres how to initiate the plugin : $('#wrapper').fluidGrids({exclude: '.exclude'}); Here's a working demo of the WIP thing : http://sandbox.test.everestconseil.com/protoCitroen/home.html Where am I having issues : Is there a fast way to detect if parent of each target (clickable animated element) is a href link, and if so to save this url ? My clone uses the original background image to then animate it.fade it to black/white. But when you clik on an element, image url is found, but doesn't seem to be injected. Do you see anything ? Finally, about animation of elements : as you can see in source code, I'm using the container $('#wrapper') to position all animated children. What would be the perfect properties to apply to make this cross browser proof ? Here's the source code for the plugin, fully commented. (function($){ $.fn.extend({ //plugin name - fluidGrids fluidGrids: function(options) { //List and default values for available options var defaults = { //The target that we're going to use to handle click event hitTarget: '.animateMe', exclude: '.exclude', animateSpeed: 1000 }; var options = $.extend(defaults, options); return this.each(function() { var o = options; //Assign current element to variable var obj = $(this); //We assign default width height and positions to each object in order to get them back when necessary var objPosition = obj.position(); //Get all ready to animate targets in innerViewport var items = $(o.hitTarget, obj); //Final coords of innerViewport var innerViewport = new Object(); innerViewport.top = parseInt(objPosition.top); innerViewport.left = parseInt(objPosition.left); innerViewport.bottom = obj.height(); innerViewport.right = obj.width(); items.each(function(e){ //Assign a pointer cursor to each clickable element $(this).css("cursor","pointer"); //To load distant url at last, we look for it in Title Attribute if ($(this).attr('title').length){ var targetUrl = $(this).attr('title'); } //We assign default width height and positions to each object in order to get them back when necessary var itemPosition = $(this).position(); var itemTop = itemPosition.top; var itemLeft = itemPosition.left; var itemWidth = $(this).width(); var itemHeight = $(this).height(); //Both the original and it's animated clone var original = $(this); //To give the if (original.css('background-image')){ var urlImageOriginal = original.css('background-image').replace(/^url|[("")]/g, ''); var imageToInsert = "<img src="+urlImageOriginal+"/>" } var clone = $(this).clone(); original.click(function() { $(clone).append(imageToInsert); $(clone).attr("id","clone"); $(clone).attr('top',itemTop); $(clone).attr('left',itemLeft); $(clone).css("position","absolute"); $(clone).insertAfter(this); $(this).hide(); $(clone).animate({ top: innerViewport.top, left: innerViewport.left, width: innerViewport.bottom, height: innerViewport.right }, obj.animateSpeed); $("*",obj).not("#clone, #clone * , a , "+ o.exclude).fadeOut('fast'); //Si l'objet du click est un lien return false; }); }); }); } }); })(jQuery);

    Read the article

  • JQUERY UI Accordion Resize on Window Resize?

    - by nobosh
    I'm using the JQUERY UI Accordion module: <script type="text/javascript"> $(function() { $("#sidebar_column_accordion").accordion({ fillSpace: true, icons: { 'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' } }); }); </script> By using the fillSpace option, the accordion takes up the entire height of the window which I want. Problem is it calculate the height on page load, and if the user resizes their browser, it does not adjust... Is there a way to have the accordion recalculate the height/size when the browser window is resized? Thanks

    Read the article

  • jQuery Sortable - Limit number of items in list.

    - by Adam
    I have a schedule table I'm using jQuiry Sortable for editing. Each day is a UL, and each event is an LI. My jQuery is: $("#colSun, #colMon, #colTue, #colWed, #colThu").sortable({ connectWith: '.timePieces', items: 'li:not(.lith)' }).disableSelection(); To make all LI's sortable except those with class "lith" (day names). User can drag an event from day to day, or add new events by clicking a button, which appends a new dragable event (LI) to the fist UL (Sunday). I want to make each day accept only up to 10 events. How do I do this? Thanks in advance!

    Read the article

  • jQuery UI Dialog Button Icons

    - by Cory Grimster
    Is it possible to add icons to the buttons on a jQuery UI Dialog? I've tried doing it this way: $("#DeleteDialog").dialog({ resizable: false, height:150, modal: true, buttons: { 'Delete': function() { /* Do stuff */ $(this).dialog('close'); }, Cancel: function() { $(this).dialog('close'); } }, open: function() { $('.ui-dialog-buttonpane').find('button:contains("Cancel")').addClass('ui-icon-cancel'); $('.ui-dialog-buttonpane').find('button:contains("Delete")').addClass('ui-icon-trash'); } }); The selectors in the open function seem to be working fine. If I add the following to "open": $('.ui-dialog-buttonpane').find('button:contains("Delete")').css('color', 'red'); then I do get a Delete button with red text. That's not bad, but I'd really like that little trash can sprite on the Delete button as well.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >