#1
  1. A Change of Season
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,534
    Rep Power
    221

    Access "data-connect-with" value


    Hi;

    This is really cool ===> link <===

    How do I access the value of "date-connect-wth" (I want it to alert "sub_headline")?

    Code:
    <span class="sub_headline editable" data-connect-with="sub_headline" data-max-length="50" data-input-type="input"> SUBHEADLINE GOES HERE</span>
    Code:
    $('.editable').inlineEdit({
        onUpdate: function(val) {
            alert(val);     /* <=-=-=-= Works well .  */
            alert(date-connect-wth);   /* <=-=-=-= Obviously error .  */ 
        }
    });
    Thank you
  2. #2
  3. Impoverished Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,795
    Rep Power
    9646
    Presumably you can use "this" inside the callback to get the .editable element that was being updated. You know what to do from there?
  4. #3
  5. A Change of Season
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,534
    Rep Power
    221
    Originally Posted by requinix
    Presumably you can use "this" inside the callback to get the .editable element that was being updated. You know what to do from there?
    A thanks. Yep

IMN logo majestic logo threadwatch logo seochat tools logo