jquery-plugins

Browsing PDF in a web page without using Flash

試著忘記壹切 提交于 2019-12-25 08:25:59
问题 I Have an N-Pages PDF linked in a my web page. I want to be able to browse the PDF, with next and prev arrows, page numbers, etc etc I want to be able to browse the PDF without using any Flash Plugin. I also want to normalize the browsing behaviour, so i don't want to use the default PDF plugin of the browser. I'm looking for a JS plugin but i don't find interesting solutions. Any other suggestions? 回答1: You can try this way: See my code below: $("a[href*=.pdf]").click(function(){ window.open

Jquery making Rateit (star) plugin work for added elements

半世苍凉 提交于 2019-12-25 06:57:12
问题 I have some rating code: $('div.rateit').rateit(); I want it also to function for added elements. Here is the plugin: http://rateit.codeplex.com/ 回答1: Seems you might need to use jQuery on() method, like this: $('div.rateit').on('event which triggers the rateit()', rateit); 回答2: It works! : If you have a look at the source of the rateit plugin (src/jquery.rateit.js) you'll see that at the end of file appears the invocation: //invoke it on all .rateit elements. This could be removed if not

Select class control-group where none of its children are span.error

纵然是瞬间 提交于 2019-12-25 06:55:06
问题 I am working with twitter bootstrap and the jquery validate plugin I have a form row that looks like: <div class="form_row" > <div class="control-group"> <label class="control-label" for="input01">home phone</label> <div class="controls"> <input type="number" class="span4" class="input-xlarge" id="home_phone" name="home_phone" value="<?php echo $this->property->home_phone ?>" rel="popover" data-content="Re-enter your home phone." data-original-title="homephone" > <input type="number" class=

Add function to the plugin js without actually modifying js file

╄→гoц情女王★ 提交于 2019-12-25 06:45:10
问题 I want to add 'setInputDataId' function at same level as the existing function '_select' is, in plugin js http://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.js file without actually modifying the file itself. So I would like to know how can I add new function, I would appreciate the help. Existing Code in Plugin: _select: function select(datum) { this.input.setQuery(datum.value); this.input.setInputValue(datum.value, true); this._setLanguageDirection(); this.eventBus

Rich text formatting (RTF) editor plugins for Rails 3 and jQuery website? [closed]

若如初见. 提交于 2019-12-25 05:38:10
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Which RTF editor do you use? We're on Rails 3 and jQuery and looking to implement a low-maintenance RTF editor. We prefer to use a

Using mobiscroll for a date range

六月ゝ 毕业季﹏ 提交于 2019-12-25 05:29:08
问题 I am trying to build a webpage where I have 2 scrollers to pick a range of dates. Both text inputs are the same class, so i am setting the 2 scrollers like so: $('.datetime').scroller({ preset: 'datetime', minDate: new Date(now.getFullYear(), now.getMonth(), (now.getDate() - 7)), theme: 'default', display: 'modal', timeFormat: 'HH:ii', timeWheels: 'HHii', stepMinute: 5, mode: 'scroller' }); What I'd like to do is to get the 2nd scroller to set as its minDate the value set by the first

running SQL after successful upload with jQuery-File-Upload

╄→гoц情女王★ 提交于 2019-12-25 05:25:29
问题 I am way out of my comfort zone here and could use some help. I am using the jQuery-File-Upload plugin to upload files to directory. On the success of the upload I would like to run an SQL query to my database. Where do I do this? Is it with the callbacks? I am using the upload.class.php 回答1: You can check if your file is uploaded on the server with the function is_uploaded_file or move_uploaded_file If these return TRUE you can running your query. 来源: https://stackoverflow.com/questions

Jquery resize plugin min width depending on which edge is being dragged [duplicate]

余生长醉 提交于 2019-12-25 05:13:30
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Jquery resizable plugin, set minWidth depending on the dragging edge How can i set the minWidth and height depending on which edge of the element is being dragged? 回答1: Kind of a weird interaction, but here it is (jsfiddle) $(function() { $( "#resizable" ).resizable({ handles : 'e, n, s, w', resize : function(event, ui){ switch($(this).data('resizable').axis) { case 'n': $(this).resizable( "option", "minHeight

Jquery plugin Vs javascript

纵饮孤独 提交于 2019-12-25 05:02:55
问题 Can somebody please explain the pros and cons for below. Am having a function to get the url querystring parameters, but I need to know which is the best way to write the function. Eg: if i create the function using jquery plugin style, then every time I need to use a target element to access the function as below $("#targetDom").getQueryString("name"); However, if I create the function using javascript classes or javascript design pattern, it would be getQueryString("name"); This is a small

JavaScript runtime error: Unable to get property 'opera' of undefined or null reference

一个人想着一个人 提交于 2019-12-25 04:56:13
问题 If I used jquery-1.9.1.min.js getting JavaScript runtime error: Unable to get property 'opera' of undefined or null reference from Jquery Isotope v1.5.19 javascript file. If I use https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js JQuery. It is working properly and goes smooth. I all want to use latest of jQuery. Any solution for this? 回答1: If you want to continue using old jQuery APIs, you need to load the jquery-migrate plugin before the jquery.1.9.1.js script. E.g. <script