Search Results

Search found 9897 results on 396 pages for 'facebook social plugins'.

Page 137/396 | < Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >

  • How to repopulate DataTables when having lots of data?

    - by chobo2
    Hi I am using datatables jquery plugin. I now have to clear the entire datatable and populate it with new data on the fly(all done through ajax). So what I was thinking to do is when I need to do this. Destroy the datatable remove the data html call up the partial view that renders the table Rebind the datatable with jquery. However it seems that datatable has no destroy method. So I know you can set the datatable to do something with ajax but I am not sure how. My datatable just uses the dom way when the page is loaded. I don't want to use the "fnAddData" as I am not sure how to format this 2d array they want and I don't think this is the best option. I think the best option is some how render the partial view back and use there ajax plugin. But I am not sure where that is or how to use it(I know it exists but that's about it). Thanks

    Read the article

  • [jQuery] JS inside the template

    - by Martin Trigaux
    Hello, I'm trying to include some javascript code inside a template. The code of my html page : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <script type="text/javascript" src="jquery-jtemplates.js"></script> </head> <body> <div id="infos"></div> <div id="my_template"></div> <script type="text/javascript"> $(document).ready(function() { $('#my_template').setTemplateURL("my_template.html"); try { $('#my_template').processTemplate({'var' : 1}); } catch (e) { $('#infos').html('error : '+e); } $('#my_button').click(function(){ alert('it works outside'); }); }); </script> </body> </html> and the template content of the template<br/> {#if $T.var == 1} <script type="text/javascript"> $(document).ready(function() { $('#my_button').click(function(){ alert('it works inside'); }); }); </script> <input type='submit' id='my_button' value='click me' onclick='alert("direct");'/> {#else} not working {#/if} produce me an error inside the infos balise error : SyntaxError: missing } after function body if I just put alert('it works inside'); inside the script balise (remove all the jquery related code), the page load, the two message "direct" and "it works outside" are showed but not "it works inside" message. It's suppose to works as said on the doc page Allow to use JavaScript code in templates Thank you

    Read the article

  • jQuery UI Element vs Dojo (Dijit) Form Element

    - by Muers
    Dojo seems to have a useful feature in that it can setup event handlers and default options, etc for Dijit.form elements as it is inserting it into the DOM. For example, Dojo: var slider = new dijit.form.HorizontalSlider({ name: sliderContainerId+'_slider', value: sliderValue, minimum: sliderMax, maximum: sliderMin, onChange: function(value){ // some event handling logic } }, sliderContainerId); However, the jQuery UI Slider traditionally is applied to DOM elements that already exist: $( sliderContainerId ).slider({ value:100, min: 0, max: 500, step: 50, slide: function( event, ui ) { $( "#amount" ).val( "$" + ui.value ); } }); I need to be able to 'programmatically' create new Sliders (and other form elements), but I'm not sure how that could be achieved with the way jQuery is structured? Maybe I'm missing something obvious here.... MTIA

    Read the article

  • How to implement automatic replacement of typos in Delphi2010

    - by sum1stolemyname
    I am looking for a way to develop a plugin for Delphi 2010IDE and have yet to find any information on that topic, not even on how to get started. What I want to accomplish is some kind of auto-spellchecker wich can be given a list of common typos (flase instead of false, .cerate instead of .create and the like) and replace them with the intended word. Do you know of a tutorial on plugin development, or maybe an open source plugin which i could base my work on?

    Read the article

  • Getting all the classes in project and their packages from CodeRush extension

    - by drasto
    I've spent some time trying to find a way CodeRush could add using when it finds undeclared element that is in the fact class name with no using added. The solution suggested in this answer to my question (Refactor_resolve) does not work (bugged?). In a process I found out that writing plug-ins for CodeRush is easy, so I decided to code this functionality myself (and share it). I'd only implement a CodeProvider (like in this tutorial). The only thinks I need to do the job are answers to this questions: At the start up of my plugin I need to get a list (set, map, whatever) of all classes and their packages. This means all the classes(interfaces...) and their packages in project, and within all referenced libraries. And I also need to receive updated on this (when user adds reference, creates new class). Can I get this from some CodeRush classes or maybe VS interface available from CodeProvider class? How do I add created CodeProvider to the pop-up that is shown when user hovers over an Issue?

    Read the article

  • jQuery Light Box not loading in all system?

    - by Harish
    I am using jQuery's thickbox.js pluging, for a modal dialog box that will appear when some one first loads the website(as a welcome banner), and after clicking on "enter site" they should be logged in to my home page. But the problem is "Modal dialog box appear's to be empty in some system(i.e OS), with same configuration, and shows only the loading progress bar". it works in some system only.. please help to find the problem??

    Read the article

  • JQuery Cascade dropdown problem?

    - by omoto
    Hi All! I'm using JQuery based Cascade plugin probably it's working, but I found a lot of problems with it Maybe somebody already faced with this plugin and maybe could help. So, I using this plugin for location filtration Here comes my CS code: public JsonResult getChildren(string val) { if (val.IsNotNull()) { int lId = val.ToInt(); Cookie.Location = val.ToInt(); var forJSON = from h in Location.SubLocationsLoaded(val.ToInt()) select new { When = val, Id = h.Id, Name = h.Name, LocationName = h.LocationType.Name }; return this.Json(forJSON.ToArray()); } else return null; } Here comes my JS code: <script type="text/javascript"> function commonMatch(selectedValue) { $("#selectedLocation").val(selectedValue); return this.When == selectedValue; }; function commonTemplate(item) { return "<option value='" + item.Id + "'>" + item.Name + "</option>"; }; $(document).ready(function() { $("#chained_child").cascade("#Countries", { ajax: { url: '/locations/getChildren' }, template: commonTemplate, match: commonMatch }).bind("loaded.cascade", function(e, target) { $(this).prepend("<option value='empty' selected='true'>------[%Select] Län------</option>"); $(this).find("option:first")[0].selected = true; }); $("#chained_sub_child").cascade("#chained_child", { ajax: { url: '/locations/getChildren' }, template: commonTemplate, match: commonMatch }).bind("loaded.cascade", function(e, target) { $(this).prepend("<option value='empty' selected='true'>------[%Select] Kommun------</option>"); $(this).find("option:first")[0].selected = true; }); $("#chained_sub_sub_child").cascade("#chained_sub_child", { ajax: { url: '/locations/getChildren' }, template: commonTemplate, match: commonMatch }).bind("loaded.cascade", function(e, target) { $(this).prepend("<option value='empty' selected='true'>------[%Select] Stad------</option>"); $(this).find("option:first")[0].selected = true; }); }); I added one condition to jquery.cascade.ext.js if (opt.getParentValue(parent) != "empty") $.ajax(_ajax); To prevent Ajax request without selected value, but I faced with problem, when I reset selection in first box 3d box and bellow does not refresh: And second issue: I would like to know where is best place to inject my own function that will do something, with one requirement - I need to know that all boxes finished work. If somebody worked within let me know maybe we could together find solution. Thanks in advice...

    Read the article

  • hosting simple python scripts in a container to handle concurrency, configuration, caching, etc.

    - by Justin Grant
    My first real-world Python project is to write a simple framework (or re-use/adapt an existing one) which can wrap small python scripts (which are used to gather custom data for a monitoring tool) with a "container" to handle boilerplate tasks like: fetching a script's configuration from a file (and keeping that info up to date if the file changes and handle decryption of sensitive config data) running multiple instances of the same script in different threads instead of spinning up a new process for each one expose an API for caching expensive data and storing persistent state from one script invocation to the next Today, script authors must handle the issues above, which usually means that most script authors don't handle them correctly, causing bugs and performance problems. In addition to avoiding bugs, we want a solution which lowers the bar to create and maintain scripts, especially given that many script authors may not be trained programmers. Below are examples of the API I've been thinking of, and which I'm looking to get your feedback about. A scripter would need to build a single method which takes (as input) the configuration that the script needs to do its job, and either returns a python object or calls a method to stream back data in chunks. Optionally, a scripter could supply methods to handle startup and/or shutdown tasks. HTTP-fetching script example (in pseudocode, omitting the actual data-fetching details to focus on the container's API): def run (config, context, cache) : results = http_library_call (config.url, config.http_method, config.username, config.password, ...) return { html : results.html, status_code : results.status, headers : results.response_headers } def init(config, context, cache) : config.max_threads = 20 # up to 20 URLs at one time (per process) config.max_processes = 3 # launch up to 3 concurrent processes config.keepalive = 1200 # keep process alive for 10 mins without another call config.process_recycle.requests = 1000 # restart the process every 1000 requests (to avoid leaks) config.kill_timeout = 600 # kill the process if any call lasts longer than 10 minutes Database-data fetching script example might look like this (in pseudocode): def run (config, context, cache) : expensive = context.cache["something_expensive"] for record in db_library_call (expensive, context.checkpoint, config.connection_string) : context.log (record, "logDate") # log all properties, optionally specify name of timestamp property last_date = record["logDate"] context.checkpoint = last_date # persistent checkpoint, used next time through def init(config, context, cache) : cache["something_expensive"] = get_expensive_thing() def shutdown(config, context, cache) : expensive = cache["something_expensive"] expensive.release_me() Is this API appropriately "pythonic", or are there things I should do to make this more natural to the Python scripter? (I'm more familiar with building C++/C#/Java APIs so I suspect I'm missing useful Python idioms.) Specific questions: is it natural to pass a "config" object into a method and ask the callee to set various configuration options? Or is there another preferred way to do this? when a callee needs to stream data back to its caller, is a method like context.log() (see above) appropriate, or should I be using yield instead? (yeild seems natural, but I worry it'd be over the head of most scripters) My approach requires scripts to define functions with predefined names (e.g. "run", "init", "shutdown"). Is this a good way to do it? If not, what other mechanism would be more natural? I'm passing the same config, context, cache parameters into every method. Would it be better to use a single "context" parameter instead? Would it be better to use global variables instead? Finally, are there existing libraries you'd recommend to make this kind of simple "script-running container" easier to write?

    Read the article

  • aggregate form elements into object ? [Solved]

    - by Mahmoud
    hey all i am trying to aggregate form elements into object and then send it via ajax here is the code that i start using but i cant figure out how to do the rest $('.jcart').live('submit', function() { }); Update 1: html form http://pasite.org/code/572 Update 2: I have successfully submit the form using ajax but it still refreshes the page after submiting this what i did function adding(form){ $( "form.jcart" ).livequery('submit', function() {var b=$(this).find('input[name=<?php echo $jcart['item_id']?>]').val();var c=$(this).find('input[name=<?php echo $jcart['item_price']?>]').val();var d=$(this).find('input[name=<?php echo $jcart['item_name']?>]').val();var e=$(this).find('input[name=<?php echo $jcart['item_qty']?>]').val();var f=$(this).find('input[name=<?php echo $jcart['item_add']?>]').val();$.post('<?php echo $jcart['path'];?>jcart-relay.php',{"<?php echo $jcart['item_id']?>":b,"<?php echo $jcart['item_price']?>":c,"<?php echo $jcart['item_name']?>":d,"<?php echo $jcart['item_qty']?>":e,"<?php echo $jcart['item_add']?>":f} }); return false; }

    Read the article

  • Step by Step validation with jquery validation plugin

    - by Alex
    I know its been asked many times already but no one could come up with solution so far. The idea is to have one form separated into few steps and validate each step on next click of the button. I know jquery validation plugin is offering quite complicated way of doing it with accordion but can anyone come up with a simple solution something like var stepOne = { rules: { fieldname1: "required", fieldname2: "required", } } $("form").validate(stepOne); //onclick hope someone could suggest the best way of doing it. Thanks.

    Read the article

  • Jenkins - Publish Over CIFS Plugin

    - by Juvil
    I am getting confused with this plug in. basically my target is to Deploy files from Server1 to Server2 now the buildoutput dir is in a specific location in Server1 example E:\BuildOutput\Apps\Application1\Bin\ I need to deploy them in Server2 C:\Program Files\Tools\Application1\Bin\ How do I set up this plugin to work to what i need? I am getting stressed in the amount of files that needs to be deployed to another server, i just wished a simple xcopy tool to another server could work.

    Read the article

  • How to Develop Dynamic Plug-In Based Functionality in C#

    - by Matthew
    Hello: I've been looking around for different methods of providing plug-in support for my application. Ideally, I will be creating a core functionality and based on different customers developing different plug-ins/addons such as importing, exporting data etc... What are the some methods available for making a C# application extensible via a plug-in architecture? Lets make up an example. If we have a program that consists of a main menu ( File, Edit, View, et al. ) along with a TreeView that displays different brands of cars grouped by manufacturer ( Ford, GM, for now). Right clicking on a car displays a context menu with the only option being 'delete car'. How could you develop the application so that plug-ins could be deployed so that you could allow one customer to see a new brand in the TreeView, let's say Honda, and also extent the car context menu so that they may now 'paint a car'? In Eclipse/RCP development this is easily handled by extension points and plug-ins. How does C# handle it? I've been looking into developing my own plug-in architecture and reading up on MEF.

    Read the article

  • How to make a plugin for Finder to browse zip-archives as folders?

    - by Andrei
    What really surprises me is lack of some essential functionality in Finder, when one migrates from Windows to OS X. One of the things is a possibility to open an archive as a folder, i.e. staying in the directory tree and being able to drag and drop files from the archive to folders in the tree, sidebar etc. What would you do to enable such functionality?

    Read the article

  • How to add fadeIn and fadeOut to idTabs plugin's JS snippet?

    - by iMagdy
    Hi, I am using the jQuery plugin idTabs [ [www.sunsean.com/idTabs][1] ] and it allows me to line tabs and tabs' content via element#id and element href="#id" Ok, so I use this snippet: <script type="text/javascript"> $(document).ready(function() { $("#requestPool").idTabs(); $(".tabs").idTabs(); $(".miniTabs").idTabs(".active"); $(".switchers").idTabs(".activePanel"); }); </script> To run the plugin on two different areas: div#requestPool this has it's own tabs and it's own tab content, Also the div.tabs which is another place and has it's own tabs and it's own tabs content. The div.miniTabs and div.switchers are the divs that includes the tabs links (tabs headers) and I putted them in the snippet to change the default selected tab class from .selected to .active and .activePanel Now, what I would love to add is a nice fadeIn and fadeOut effects to the content of my tabs while browsing through them. Thanks Here is the HTML code for one of the tabbed areas: <div id="requestPool"> <!-- The tabs heads --> <div class="miniTabs"> <a href="#today" class="active">Today</a> <!-- First active tab --> <a href="#tomorrow">Tomorrow</a> <a href="#friday">Friday</a> <a href="#saturday">Saturday</a> <a href="#sunday">Sunday</a> <a href="#monday">Monday</a> <a href="#tuesday">Tuesday</a> </div> <!-- The tabs contents (the ones that I want them to fade in and out while browsing through them using the tabs above) --> <div id="today"class="miniTab"></div> <div id="tomorrow"class="miniTab"></div> <div id="friday"class="miniTab"></div> <div id="saturday"class="miniTab"></div> <div id="sunday"class="miniTab"></div> ...etc the week days </div> Thanks very much (again the tabs are working very fine, but without the fade effect which I want to have).

    Read the article

  • jQuery plugin call internal function

    - by pbcoder
    I want to call removeSomething() (see in line 9) internally: JS-Code is: (function($){ $.fn.extend({ Engine: function(options) { var defaults = { ... }; var options = $.extend(defaults, options); removeSomething(); //----------------------------------------------------------------------- //Public Functions ------------------------------------------------------ //----------------------------------------------------------------------- this.removeSomething = function() { ... }; } }); })(jQuery); But if I call removeSomething console outputs that removeSomething is not a function, how do I have to call this function? The function should be available internally and externally. Thanks for help!

    Read the article

  • jQuery - how to pass $(this) as an object?

    - by regan
    Hello! I'm trying to pass an object into a function but think there's a problem with $(this) not actually being valid at the point of passing it in. $('textarea#quote').live('bind',function(){ }).limit('10',$(this).parents('form').children().find('span#qc') ); The second parameter can be either a string or an object like $('span#qc'), but I also want to be able to pass in an object which references the current one. Why? Because I have several forms on same page, each containing textarea#quote, so depending on which form is selected I want to be able to reference a particular element within the same form. Anyone??

    Read the article

  • Rails Plugin for Multiple Ratings Per Model?

    - by Kevin
    I'm looking to add the capability of rating a model I have under several different categories like "Knowledgeable" "Organized", etc. Is there a plugin that will allow me to do this, and maybe even have a cool x/5 stars graphical representation as well?

    Read the article

  • CSS horizontal scrolling overflow with jQuery slider

    - by Jeffrey
    I'm trying to setup a full screen jquery slider. I've broken the project into two steps 1) css and 2) js. 1) CSS, below is a picture of what I'm shooting for (no fixed height) and below that is the code I have so far that doesn't work. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style type="text/css"> /* Positioning */ #container { width: 2500px; } .block { display: inline; } /* Styling */ .block img { padding: 5px; } </style> </head> <body> <div id="container"> <div class="block"><img src="http://i42.tinypic.com/1zp2poz.gif"></div> <div class="block"><img src="http://i42.tinypic.com/1zp2poz.gif"></div> <div class="block"><img src="http://i42.tinypic.com/1zp2poz.gif"></div> </div> </body> </html> 2) Javascript, using jquery I'd like the divs to slide left when clicked on them... like the jQuery Coda Slider if possible. Thanks, any help is appreciated.

    Read the article

  • [jQuery] How to load vtip tooltip on a dynamically generated element?

    - by adaneko
    I'm new to jQuery and trying to combine the use of a tooltip plugin and a lightbox plugin. More specifically, I am using Colorbox (http://colorpowered.com/colorbox/) and vtip. Colorbox generates a div which displays an image like this: <div id="cboxLoadedContent" style="display: block; width: 400px; overflow: auto; height: 498px;"> <img src="image.jpg" id="cboxPhoto" style="margin: 49px auto auto; border: medium none; display: block; float: none; cursor: pointer;"> </div> I next add class="vtip" title="This is a tip." in order to use the vtip style, but for some reason it does not work when it's a title tag on an element dynamically generated by Colorbox, but works on anything already loaded on the page. Can anyone explain to me why this is and possibly offer some solutions to fix this problem?

    Read the article

  • jQuery Tooltip plugin error

    - by hd
    i have written this code to apply 'jQuery Tooltip plugin' to ajax loaded elements. i mean the row i want to show tooltip on its mouseover is loaded into page by ajax. here's the code: $("[id^=pane]").delegate("[id^=comm]","mouseover",function() { $(this).tooltip({ // each trashcan image works as a trigger tip: "#tooltip", // custom positioning position: "center right", // move tooltip a little bit to the right offset: [0, 15], // there is no delay when the mouse is moved away from the trigger delay: 0 }).dynamic({ bottom: { direction: "down", bounce: true } }); }); the tooltip is shown when mouseover but firebug report this error: "$(this).tooltip({tip: "#tooltip", position: "center right", offset: [0, 15], delay: 0}).dynamic is not a function" is it because of using $(this) ???

    Read the article

  • What jquery based table plugin can hide sub rows?

    - by user1458290
    I'm in the need to convert excel macros into jquery code, the function is that you need to click on the plus sign to unfold and show the sub rows to modify column2 if you want to type values in column2, the other columns can't be modified. You can't straightly modify values of column2 until you unfold the parent row, because there are many sub rows belonging to parent row,say Car. The values of Name, Model, Code are existing, they are master data, no need to type or modify. please see the snapshot at folded and unfolded, besides modifying values in sub rows , I need to be able to know which sub rows are modified and values of those rows.Initially the editable columns are blank. And when you click on the minus sign, the sub rows can be folded again,but the modified values won't be lost,they are still there when unfolded again. One last requirement is it's cross devices, the code must run well on pc,mobile phone,pad. Is that possible? Many thanks.

    Read the article

  • Click Function on jQuery plugin only allows for single click

    - by user1427307
    I've created this simple plugin to add multiple animations on click but the problem is that once the object is clicked it can not repeat the animation by clicking again, i can't figure out why the added class is not removing itself after the click function is complete to allow it to be clicked again and repeat.. any suggestions? (function($) { $.fn.vivify = function(options) { var defaults = { animation: 'bounce', }; var options = $.extend(defaults, options); return this.each(function() { var o = options; var obj = $(this); var animation = o.animation; obj.bind("click", function() { obj.addClass(o.animation); obj.addClass('vivify'); }, function() { obj.removeClass(o.animation); }); }) } })(jQuery);

    Read the article

< Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >