All Questions
Tagged with jquery-widget-factory or jquery-ui-widget-factory
79 questions
0
votes
1
answer
50
views
JQuery Widget Factory, use options to set widget on webpage
I am still a newbie at JavaScript and don't have years of experience using JavaScript on Web Development. JavaScript is very messy considering nesting of functions and sometimes objects and things ...
0
votes
1
answer
198
views
How to read an option of my custom jQuery widget?
I have prepared a simple test case of my issue:
I have a custom jQuery UI Widget representing a game table.
And I am trying to show or hide the game tables depending on the max option, which can have ...
1
vote
1
answer
450
views
How to add a click handler to a custom jQuery UI widget and use the widget's property in the handler?
I have prepared a jsfiddle for my problem.
I define a custom jQuery UI widget representing a game table with up to 4 players and a white gid ("game id") number in the middle:
Here is my ...
0
votes
2
answers
382
views
Autocomplete from remote datasource doesn't give any suggestions
Autocomplete suggestion are narrowed based on the form. Thing is I am able to send filter(s) to the server; which also gives the correct output but it does not end up as suggestions (autocomplete) in ...
0
votes
2
answers
423
views
How to create a widget instance in jQuery
Consider I have two widgets.
$.widget( "custom.car", {
options: {
name: ''
},
_create: function() {
this.options.name = 'car'
},
random: function( event ) {
...
0
votes
1
answer
263
views
jQuery Widget Factory setting options TypeError
I want to create a custom slider plugin in Widget Factory, but it doesn't work. Why can't I use either the .option() function, or the .setMyOptions() custom function I created. I get the TypeError: &...
0
votes
2
answers
176
views
click event in jQuery UI widget factory using .on()
I'm trying to implement the simple manipulation functionality from jQuery UI Tabs.
But instead of having the code outside the widget, I want to have it inside the widget itself.
The "add new tab" is ...
3
votes
1
answer
209
views
jQuery UI widget factory: how to reference widget instance using 'this' inside a options?
I have the following code snippet:
$.widget("tj.commonCoordinator", {
options: {
"obx_type": "common_obx",
"obx_callbacks": {
request_modify: function(event, ui) {
...
3
votes
2
answers
342
views
Javascript: How to reference the owner of the owner object inside a options object like this?
I wrote a jQuery UI widget like this:
$.widget("ns.wid", {
options: {
attr1: "something1",
attr2: {
"sub_attr": this.__renderList,
"css": {
...
1
vote
0
answers
65
views
Widget factory extension of the jquery ui progress bar doesn't affect look of a div on a jsfiddle
I wanted to extend a progress bar using Widget Factory. When I tried sample script presented on JQuery site and copied it to jsfiddle it doesn't work. There are no errors.
JSFiddle: https://jsfiddle....
0
votes
1
answer
83
views
Scoping issue with jQuery UI Widget Factory
I have a scoping problem that i cannot find a solution for in Google here is a simplified version of my code
jQuery.widget( "myNamespace.myPlugin", {
options: {},
_create: function() {
...
0
votes
0
answers
45
views
How can i keep the context of the widget inside an eventListener in JQuery?
I am building a widget that will create a map based on Google Maps API. I am having a hard time to use the context of the widget inside the event listener.
Here is my code:
(function( $ ) {$.widget( "...
1
vote
1
answer
556
views
How to Implement inheritance in Jquery UI widget
I am trying to inherit a method from base widget to another widget.
here is my sample code
My base widget is
$(function () {
$.widget("UI.baseWidget", {
options: {
testVal:''
...
0
votes
1
answer
470
views
How can widget.bridge connect a jquery jquery-ui?
I want to upgrade jQuery and jQuery UI's version in my project
but tabs widget has problem.
active event is not working
so i want fix it and know what is wrong
how does $("tabs").tabs("option", "...
0
votes
1
answer
285
views
JQuery UI widget chaining: After a Widget Factory widget is initialised, how do I change what is returned by the initialising function?
I have written a JQuery UI widget with the Widget Factory which I plan to call on new, empty elements, which are then replaced by a new HTML structure based on a template in a private function in the ...
0
votes
1
answer
44
views
Determining the type of a standard jQueryUI widget
I am having trouble determining the type of a given jQueryUI widget instance.
The jQueryUI documentation for the Widget Factory suggests two techniques. From the "Instance" section:
The widget's ...
1
vote
1
answer
2k
views
Dynamically add new options to existing custom autocomplete
How could I dynamically add a label to existing categories in jQuery UI custom autocomplete? I have made a custom autocomplete like described here (jQuery UI docs for autocomplete):
<html lang="en"...
0
votes
1
answer
3k
views
How to destroy a jQuery UI widgets from within it's prototype
I've gotten on board to using the Widget Factory for creating plugins. However I can't seem to find a way to destroy the plugin from within.
In all the examples and tutorials I've found so far they ...
0
votes
0
answers
49
views
Object property being read as undefined even though the object lists it as set
I have a JS Widget that is used to work out the closest location to a users current location from a list (using lat/long).
First of all I use the _create() method tries to set the users location by ...
5
votes
1
answer
2k
views
Difference between React.js and jQueryUI widget factory
I've been reading about react.js library from Facebook lately, but I cannot see any difference between React and jQueryUI widget factory. Can someone make comparison between the two and tell me why ...
0
votes
0
answers
303
views
Using inherited widget on child element in Jquery Ui Widget Factory
I am trying to make my custom draggable widget with JQuery Ui factory, which inherits draggable.
It works fine when the element itself, but I need to use draggable only on its child element. Is it ...
1
vote
1
answer
426
views
Execute jQuery widget method inside a ajax request / setTimeout
I try to call another method inside a setTimeout function, but it do not find the method if I use this.install() inside setTimeout.
I have tried some solutions but seems not to solve it, so therefor ...
0
votes
1
answer
2k
views
Jquery widget undefined
First, I am using an MVC WebAPI project. My scripts are configured in the bundle config and then rendered on the page (Index.cshtml).I am trying to create a JQuery widget using the widget factory. I ...
2
votes
3
answers
5k
views
How to use jquery-ui selectmenu extension methods(_renderItem, _renderMenu etc)
The JQuery-UI selectmenu widget has some extension methods that can be used to customize rendering/styling of the dropdown select menu.
From the api docs , the following widget extension methods can ...
0
votes
2
answers
56
views
How can I use getscript from insidea jquery widget
I have a new jquery UI widget factory widget, in the create method I want to load a js file and then do stuff with it. However when I call $.getScript and refer to "this" within the call back "this" ...
0
votes
0
answers
180
views
'dialogclose' event does not works on ui-dialog widget extension
I have this problem and I hope someone can help me.
I extend the 'Ui.dialog' widget, making a new widget, 'qui.qdialog':
$ .widget ( ' qui.qdialog ', $ .ui.dialog , {
options: {
...
0
votes
2
answers
233
views
jQuery UI widget factory _on event returns unexpected event target
I have a little problem understanding the event handling of the jQuery Ui Widget factory.
See this snipped:
$(function () {
$.widget("custom.superduper", {
_create: function () {
...
1
vote
1
answer
979
views
JQuery UI Widget Factory alternatives
I've just found this question that is asking exactly what I was looking for: a way to construct in OOP a widget that can present complex DOM aggregate.
I'm not using JQuery so I'm asking alternative ...
1
vote
1
answer
870
views
jQuery Widget Factory access options in a callback method
I'm trying to create a jQuery control using the widget factory. The idea is that I turn a button into a jQuery button, give it an icon, and register the click event for that button such that when ...
2
votes
0
answers
87
views
Exclude widget's input fields from being submitted in parent form
I've created a widget using the widget factory and have added elements like <input> that are required by it. This widget can be initialized inside a form element, resulting in submitting the ...
1
vote
0
answers
73
views
Avoid repeating options when combining jQuery widgets
I have created a Datetime widget based on the widget factory, similar to the jQuery datepicker, that has a set of options. For example you can set the localized months (month names in different locals)...
0
votes
2
answers
90
views
How to get options from html?
I am using jQueryUI Widget Factory and I am trying to retrieve the options that I set in the html file.
Here is the Widget Code (form.js):
(function ($, undefined) {
$.widget('ulti.uiForm', {
...
0
votes
1
answer
240
views
jQuery UI widget missing option method
I'm a little confused as to why this newly minted jQuery UI Widget doesn't have an option method?
(function ($) {
$.widget('ui.oTest', {
options: {},
_create: function(){
...
1
vote
1
answer
517
views
Developing UI components for Bootstrap using jQuery UI Widget Factory
Can the jQuery UI Widget Factory be used to create widgets that will play nice with Twitter Bootsrap? I know that many existing jQuery UI widgets cause problems when used in conjunction with Bootstrap....
0
votes
1
answer
957
views
jQuery widget _on delegating Element
I am using the Widget factory from jQuery UI into a existing production environment.
This environment uses a binded event called sm2.validateNext which triggers before the page changes. However when ...
0
votes
1
answer
121
views
Binding to the 'create' event of jQuery UI widget outside the widget
I'm having troubles binding to the 'create' event of the widget that uses jQuery UI Widget Factory. It only happens if I'm binding to it outside the widget. Please see the snippet (simplified for ...
0
votes
1
answer
44
views
Get the object that called a custom widget within the widget
I'm creating a basic jQuery slideshow for my website using the Widget Factory.
$('#front-page-slideshow .slides-container').slideShow({});
Once the widget has been initiated, how can I get the ...
0
votes
1
answer
250
views
jquery: widget not destroying reapplying properly
Here is jQuery widget code:
(function($){
var _this,ele,parent;
$.widget('test.talkWidget',{
options:{
a:'',
b:''
},
destroy: function()
...
0
votes
1
answer
382
views
jQuery widget factory _destroy method
I am trying to create a timer widget that can be initialized with a number of seconds and then reset at any time by making a new call with a new 'number of seconds' to countdown from. So far I have ...
0
votes
1
answer
209
views
direct access to jQuery widget factory plugin methods
Using the jQuery widget factory, i want to test internally that methods get called. How can I expose those methods to spy on them?
$.widget 'foo',
_init: ->
@_bar()
_bar ->
barSpy = ...
1
vote
1
answer
130
views
How in the world to 'trigger' events get bound in custom jQuery-Ui widgets?
I'm trying to integrate this plugin into my app: https://github.com/mar10/jquery-ui-contextmenu/blob/master/jquery.ui-contextmenu.js
I'm completely baffled as to how right-clicking an element that ...
0
votes
2
answers
360
views
maintaining scope inside a jquery ui widget
I am having a problem with loosing scope inside a widget. Inside _initialize, this.options does not work, and neither does that.options. How can I access the scope of the widget from this method?
$....
0
votes
1
answer
159
views
jquery widget: attach event to particular element
Following is the the snippet of a widget:
(function($){
var ele,_this;
$.widget('test.mywidget',{
_loadComments:function(d)
{
$.each(d,function(k,v){
var ...
0
votes
1
answer
243
views
Creating a jQuery UI plugin: IIFE & return object
I'm trying to create a little jQueryUI plugin that allows the user to draw rectangles on a div#canvas. The plugin extends ui.mouse and takes care of appending a helper, to visualize the process of ...
0
votes
2
answers
1k
views
Do I need to define 'self', 'element' etc. at the start of every function within a JQuery Widget
I create JQuery Widgets something like this
<script type="text/javascript">
(function ($) {
$.widget("cb.bacon", {
_create: function() {
var self = this,
...
4
votes
1
answer
375
views
Is it not possible to set an on() listener for a jqueryui/jqm widget event on $(document)?
I'm trying to set a global event binder on $(document) which roots to all of my core application functions.
I'm using some jQueryUI widgets (from jQuery Mobile) and was hoping I could also include ...
1
vote
1
answer
2k
views
How to set the options in jQuery widget Factory with values from server side variables(JSON file)
I want to set the options for widget with JSON file variable values? How can I do it plus how do I pass the json file to the client side?
The code is being copied from the jQueryUI Widget Factory
&...
1
vote
1
answer
2k
views
Passing function object references as serialized json
I have written some widgets using the jquery widget factory. Normally, I pass options and callback references using the widget constructor in a JavaScript code block.
Now I want to use the widgets ...
9
votes
7
answers
11k
views
requirejs + jqueryui = $.widget not defined
I am using requirejs + jquery + jqueryui. I have read TONS of examples of how to do this. I think I understand the various approaches and it seems to me that my setup should be working correctly. ...
0
votes
1
answer
2k
views
jQuery UI Widget Factory - JavaScript Reference Error function is not defined
I am having issues with calling private/public functions within a custom dialog widget that I am trying to create. For some reason, when I try to call a method called _clean() from the _create() ...