Question: Javascript Question - Location Of A Function

Javascript Question - Location Of A Function

Hi, in themes\...\add_category.php, there is the following javascript : ```javascript <script> $(document).ready(function() { $('.gen_slug').change(function(e) { ge

DH

Dominique HUGO

Asked
Hi,

in themes\...\add_category.php, there is the following javascript :

```javascript
<script>
$(document).ready(function() {
$('.gen_slug').change(function(e) {
getSlug($(this).val(), 'category');
});
});
</script>
```

I just wonder where is located the function "getSlug" ? there is a such function in assets\js\core.js but it doesn't seem that's the right one, it is never executed ...

Can you help be where this function is located ?

thanks in advance,

sincerly,
Domi.
  • MS

    Mian Saleem

    Answered
    Hello,

    Please check `themes/default/admin/assets/js/core.js`

    ```javascript
    function getSlug(title, type) {
    var slug_url = site.base_url + 'welcome/slug';
    $.get(slug_url, { title: title, type: type }, function (slug) {
    $('#slug').val(slug).change();
    });
    }
    ```

    Thank you
  • DH

    Dominique HUGO

    Answered
    Thanks !
    Domi.
  • Login to Reply