Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8657929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:38:34+00:00 2026-06-12T15:38:34+00:00

I am using an jquery plugin on a dropdown and I am also using

  • 0

I am using an jquery plugin on a dropdown and I am also using Angular js to update content based on what I am selecting. The problem I am having Angular watch does not work with the jquery plugin, removing the plugin makes everything work but I can not remove it because I need to use it. Here is my code:

<select id="chart_csv" ng:model="report">
    <option value="cancel">Cancel</option>
    <option value="rate">Rate</option>
</select>  

And I have this jquery plugin that I use on on the dropdown:
jquery plugin: http://designwithpc.com/Plugins/ddSlick

jQuery(function($){
    $('#chart_csv').ddslick({
        width:300,
        selectText: "Select your csv output",
        imagePosition:"right" 
    });        
});

In angular I have the following code:

$scope.$watch("report", function() {
    switch ($scope.report) {
        case "cancels":                
            //update some content              
        case "rate":       
           //update other content

        default:
           // default here
    }
});

How can I make angular listen for the change that is triggered by the jquery plugin?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:38:36+00:00Added an answer on June 12, 2026 at 3:38 pm

    In the comments above, you asked me how you could write such a directive. Well, like all of JavaScript, there’s a lot of ways to skin this cat, so I’ll give you the basics and you can probably come up with something that suits you, as I’m not really familiar with the plugin you’re trying to use:

    app.directive('myDdslick', function($parse) {
      return {
         restrict: 'A', //this is an attribute,
         link: function(scope, elem, attr, ctrl) {
             var model = $parse(attr.myDdslick);
             elem.ddslick({
                width:300,
                selectText: "Select your csv output",
                imagePosition: "right" 
             };
             elem.change(function(){
               model.assign(scope, elem.val());
             });
         }
      }
    });
    

    Then your markup would be something like this:

    <select id="chart_csv" my-ddslick="report">
        <option value="cancel">Cancel</option>
        <option value="rate">Rate</option>
    </select>
    

    None of that is tested, but it’s the basic idea. On it’s surface, it seems like ng-model should have just worked. If the above doesn’t work, then maybe the change event on the select isn’t firing because the plugin is setting the value programmatically.

    I hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using uniform jQuery plugin and I'm using ASP.NET. Whenever I update my dropdown
im using fullcalendar jquery plugin in my web. i have a problem in which
I'm using this jquery plugin to make my select dropdown boxes look nicer. http://code.google.com/p/select-box/
I'm using jquery with datatable.editable plugin, I'm managing to add a dropdown from static
When using jquery.selectbox.js plugin for making great looking SELECT dropdowns, I encountered a problem
I am trying to remove text from a dropdown menu using a Jquery plugin
I'm having some trouble with scoping in javascript. I'm using a jquery plugin to
I am using this plugin: http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/index.html (dropdown style) And it is working well but
Here I'm using jquery validate plugin. In my form are having one drop down
I'm using the Jquery plugin msdropdown http://www.marghoobsuleman.com/jquery-image-dropdown but am confused on how to change

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.